Consistency in design and formatting update.
parent
b3bee135c8
commit
4108a7c747
@ -6,14 +6,13 @@ Initially `$ZSH_CUSTOM` points to oh-my-zsh's `custom` directory. Whatever you p
|
|||||||
|
|
||||||
Let's say you created your own plugin `foobar` and want to add it to your configuration.
|
Let's say you created your own plugin `foobar` and want to add it to your configuration.
|
||||||
|
|
||||||
```bash
|
##### _~/.zshrc_
|
||||||
# Your .zshrc
|
```shell
|
||||||
plugins=(git bundler foobar)
|
plugins=(git bundler foobar)
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, create a `foobar` directory inside the `plugins` folder and an initialization script to launch your plugin. This script has to follow a naming convention, as all plugin files must have an ending of `.plugin.zsh`. Your file tree should look like this:
|
Then, create a `foobar` directory inside the `plugins` folder and an initialization script to launch your plugin. This script has to follow a naming convention, as all plugin files must have an ending of `.plugin.zsh`. Your file tree should look like this:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
zsh_custom
|
zsh_custom
|
||||||
└── plugins
|
└── plugins
|
||||||
@ -39,7 +38,7 @@ zsh_custom
|
|||||||
|
|
||||||
and within your .zshrc,
|
and within your .zshrc,
|
||||||
|
|
||||||
```bash
|
```shell
|
||||||
ZSH_THEME="my_awesome_theme"
|
ZSH_THEME="my_awesome_theme"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -53,8 +52,8 @@ Hint: Using a random theme with `$ZSH_THEME="random"` will not look into your cu
|
|||||||
|
|
||||||
oh-my-zsh's internals are defined in its `lib` directory. To change them just create a file inside the `custom` directory (its name doesn't matter, as long as it has a `.zsh` ending) and start customizing whatever you want. Unsatisfied with the way `git_prompt_info()` works? Write your own implementation!
|
oh-my-zsh's internals are defined in its `lib` directory. To change them just create a file inside the `custom` directory (its name doesn't matter, as long as it has a `.zsh` ending) and start customizing whatever you want. Unsatisfied with the way `git_prompt_info()` works? Write your own implementation!
|
||||||
|
|
||||||
```bash
|
##### _$ZSH_CUSTOM/my_patches.zsh_
|
||||||
# custom/my_patches.zsh
|
```shell
|
||||||
function git_prompt_info() {
|
function git_prompt_info() {
|
||||||
# prove that you can do better
|
# prove that you can do better
|
||||||
}
|
}
|
||||||
@ -62,13 +61,12 @@ function git_prompt_info() {
|
|||||||
|
|
||||||
Such customization files will always be the last thing that oh-my-zsh sources before handing over control to your terminal. Also use this approach if you want to override specific details of built-in plugins.
|
Such customization files will always be the last thing that oh-my-zsh sources before handing over control to your terminal. Also use this approach if you want to override specific details of built-in plugins.
|
||||||
|
|
||||||
|
|
||||||
## Using another customization directory
|
## Using another customization directory
|
||||||
|
|
||||||
If you don't want to use the built-in `custom` directory itself, just change the path of `$ZSH_CUSTOM` inside your `.zshrc` to a directory of your own liking. Everything will be fine as long as you adhere to the conventional file hierarchy.
|
If you don't want to use the built-in `custom` directory itself, just change the path of `$ZSH_CUSTOM` inside your `.zshrc` to a directory of your own liking. Everything will be fine as long as you adhere to the conventional file hierarchy.
|
||||||
|
|
||||||
```bash
|
##### _~/.zshrc_
|
||||||
# your .zshrc
|
```shell
|
||||||
ZSH_CUSTOM=$HOME/my_customizations
|
ZSH_CUSTOM=$HOME/my_customizations
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user