You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`mkcd`| Create a new directory and change to it, will create intermediate directories as required. |
21
-
|`take`| Like `mkcd`, but also knows how to handle remote URLs. When given an argument that looks like a URL (something that ends in `.git` or `.tar.(gz\|bz2\|xz)`), download the remote resource and extract it (if necessary) into the current directory. Then change to the newly extracted/downloaded/cloned directory. |
22
-
|`zsh_stats`| Get a list of the top 20 commands and how many times they have been run. |
|`mkcd`| Create a new directory and change to it, will create intermediate directories as required.|
23
+
|`take`| Like `mkcd`, but also knows how to handle remote URLs. When given an argument that looks like a URL (something that ends in `.git` or `.tar.(gz\|bz2\|xz)`), download the remote resource and extract it (if necessary) into the current directory. Then change to the newly extracted/downloaded/cloned directory. |
24
+
|`zsh_stats`| Get a list of the top 20 commands and how many times they have been run.|
Copy file name to clipboardExpand all lines: Contribution-Technical-Practices.md
+2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
+
<!-- prettier-ignore-start -->
1
2
> _This wiki is automatically published from [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki). To edit this page,_
2
3
> _go to [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki), make your changes and submit a Pull Request._
4
+
<!-- prettier-ignore-end -->
3
5
4
6
Oh My Zsh is a community-driven project and contributions are welcome, but it all works best with a proper setup. Here follow the best practices for setting up a fork and getting started for contributing.
Copy file name to clipboardExpand all lines: Customization.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
+
<!-- prettier-ignore-start -->
1
2
> _This wiki is automatically published from [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki). To edit this page,_
2
3
> _go to [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki), make your changes and submit a Pull Request._
4
+
<!-- prettier-ignore-end -->
3
5
4
6
Oh My Zsh is fully configurable to your needs with the help of the `$ZSH_CUSTOM` variable, whether you want to change its internals, plugins or the rich theme set – and all that **without forking**!
5
7
@@ -30,11 +32,11 @@ $ZSH_CUSTOM
30
32
31
33
Also follow these steps if you want to override plugins that ship with your Oh My Zsh installation. To override a plugin with a custom version, put your custom version at `$ZSH_CUSTOM/plugins/<plugin_name>/`. For example, if it's the rvm plugin you want to override, create the directory `custom/plugins/rvm` and place a file called `rvm.plugin.zsh` inside of it.
32
34
33
-
This method will override the entire plugin: your custom plugin files will be loaded *instead* of the files from the original plugin.
35
+
This method will override the entire plugin: your custom plugin files will be loaded _instead_ of the files from the original plugin.
34
36
35
37
### Partially overriding an existing plugin
36
38
37
-
To partially customize a plugin by redefining individual functions or variables from it, use a "patch" plugin. Create a custom "patch" plugin with a different name that has definitions for just the items you wish to override, and load that after the base plugin by putting your patch plugin in `$plugins`*after* the base plugin it customizes. (This is necessary because user custom files are loaded before any plugins are loaded.) Make sure it doesn't have the same name as any other base plugin, either.
39
+
To partially customize a plugin by redefining individual functions or variables from it, use a "patch" plugin. Create a custom "patch" plugin with a different name that has definitions for just the items you wish to override, and load that after the base plugin by putting your patch plugin in `$plugins`_after_ the base plugin it customizes. (This is necessary because user custom files are loaded before any plugins are loaded.) Make sure it doesn't have the same name as any other base plugin, either.
38
40
39
41
This may or may not work, depending on how the plugin is written: your redefinitions only take effect after the plugin has been loaded by `source`-ing its definition file. If any of the things you redefine are called or referenced during the plugin's initialization, they will not see your redefinitions.
Copy file name to clipboardExpand all lines: Design.md
+13-11
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
+
<!-- prettier-ignore-start -->
1
2
> _This wiki is automatically published from [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki). To edit this page,_
2
3
> _go to [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki), make your changes and submit a Pull Request._
4
+
<!-- prettier-ignore-end -->
3
5
4
6
This page is a description of the current architecture and design of Oh My Zsh.
5
7
@@ -25,7 +27,7 @@ It seems that plugins can get arbitrarily powerful and do whatever they want, so
25
27
26
28
## Variables
27
29
28
-
These are variables that base OMZ (excluding any plugins) uses. I've read through .oh-my-zsh so far, but not the lib/*.zsh files. More may be on the way.
30
+
These are variables that base OMZ (excluding any plugins) uses. I've read through .oh-my-zsh so far, but not the lib/\*.zsh files. More may be on the way.
-`DISABLE_LS_COLORS` – in lib/theme-and-appearance
45
47
-`ENABLE_CORRECTION`
46
48
-`ZSH_CACHE_DIR`
@@ -67,13 +69,13 @@ At init:
67
69
-`POST_1_7_2_GIT`
68
70
-`PAGER`
69
71
-`LESS`
70
-
-`FX`– special terminal control "effects" (reset/bold/no-bold/etc)
72
+
-`FX` – special terminal control "effects" (reset/bold/no-bold/etc)
71
73
-`FG`
72
74
-`BG`
73
75
74
76
At init (defaults if not provided):
75
77
76
-
-`ZSH_CUSTOM`- defaults to `$ZSH/custom`
78
+
-`ZSH_CUSTOM` - defaults to `$ZSH/custom`
77
79
-`ZSH_CACHE_DIR` - defaults to `$ZSH/cache`
78
80
-`ZSH_COMPDUMP`
79
81
-`ZSH_SPECTRUM_TEXT`
@@ -117,7 +119,7 @@ The initialization steps in detail:
117
119
- Discovers and sources all lib files, in alphabetical order, respecting custom overrides
118
120
- Load custom user code
119
121
- Source each `$ZSH_CUSTOM/*.zsh` file, in alphabetical order
120
-
- Pre-load plugins (add to `$fpath`, but don't source)
122
+
- Pre-load plugins (add to `$fpath`, but don't source)
121
123
- Set `$SHORT_HOST`
122
124
- Initialize Completion support
123
125
- Set `$ZSH_COMPDUMP`
@@ -130,16 +132,16 @@ The initialization steps in detail:
130
132
131
133
In Oh My Zsh terms, _customization_ means adding or overriding zsh code, including its internals and implementation. It's not just a term for user-specified configuration.
132
134
133
-
Overriding internals can be done by adding `*.zsh` files to the `$ZSH_CUSTOM` root directory. All `*.zsh` files there will be sourced after OMZ loads and sources its own lib/* files. This allows you to redefine functions after the fact. (This will take place after any setup has called OMZ functions.) These are referred to as "config files" in oh-my-zsh.sh.
135
+
Overriding internals can be done by adding `*.zsh` files to the `$ZSH_CUSTOM` root directory. All `*.zsh` files there will be sourced after OMZ loads and sources its own lib/\* files. This allows you to redefine functions after the fact. (This will take place after any setup has called OMZ functions.) These are referred to as "config files" in oh-my-zsh.sh.
134
136
135
137
It's not documented in the _Customization_ page, but `$ZSH_CUSTOM/lib/*.zsh` do override the corresponding internals lib files. If a custom one is present, it is sourced instead of the one in the distribution.
136
138
137
139
So, you can:
138
140
139
-
- Override lib/* files on a per-file basis (loaded instead of the base file of the same name)
141
+
- Override lib/\* files on a per-file basis (loaded instead of the base file of the same name)
140
142
- Add arbitrary customization code that runs later and can redefine any function or variable from the core
141
143
- Override plugins and themes on a per-plugin/theme basis (loaded instead of base)
142
-
- Override parts of plugins by defining an additional "patch" plugin and including it in `$plugins`*after* the base plugin
144
+
- Override parts of plugins by defining an additional "patch" plugin and including it in `$plugins`_after_ the base plugin
143
145
144
146
`$ZSH_CUSTOM` controls where the custom override files are found; defaults to `$ZSH/custom` (under the main OMZ installation).
145
147
@@ -169,7 +171,7 @@ Themes control the appearance of the `zsh` prompt, the appearance of certain oth
169
171
170
172
OMZ turns on the `prompt_subst` shell option, and OMZ themes assume it is enabled.
171
173
172
-
Themes set a variety of variables to control the appearance of the zsh prompt. They may also install hook functions. These variables are read by core OMZ functions like `git_prompt_info()` and used to modify their behavior and style their output.
174
+
Themes set a variety of variables to control the appearance of the zsh prompt. They may also install hook functions. These variables are read by core OMZ functions like `git_prompt_info()` and used to modify their behavior and style their output.
173
175
174
176
Things themes do:
175
177
@@ -183,7 +185,7 @@ These variables are set by themes to control the prompt's appearance and other c
183
185
184
186
-`PROMPT`
185
187
-`DEFAULT_USER`
186
-
-`ZSH_THEME_SCM_PROMPT_PREFIX`– used in `bzr_prompt_info()` from `lib/bzr.sh`
188
+
-`ZSH_THEME_SCM_PROMPT_PREFIX` – used in `bzr_prompt_info()` from `lib/bzr.sh`
Copy file name to clipboardExpand all lines: External-plugins.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,7 @@
1
-
> _This wiki is automatically published from [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki). To edit this page, go to [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki), make your changes and submit a Pull Request._
1
+
<!-- prettier-ignore-start -->
2
+
> _This wiki is automatically published from [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki). To edit this page,_
3
+
> _go to [ohmyzsh/wiki](https://github.com/ohmyzsh/wiki), make your changes and submit a Pull Request._
0 commit comments