Compare commits
1 Commits
ad766e0efa
...
f54e404a53
| Author | SHA1 | Date |
|---|---|---|
|
|
f54e404a53 |
44
README.md
44
README.md
|
|
@ -3,9 +3,8 @@ zsh-completions .**
|
**Additional completion definitions for [Zsh](https://www.zsh.org/).**
|
||||||
|
|
||||||
*This project aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.*
|
*This projects aims at gathering/developing new completion scripts that are not available in Zsh yet. The scripts may be contributed to the Zsh project when stable enough.*
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -25,7 +24,6 @@ zsh-completions  |
|
| NetBSD | [pkgsrc](https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-completions/README.html) |
|
||||||
| FreeBSD | [shells/zsh-completions](https://www.freshports.org/shells/zsh-completions) |
|
| FreeBSD | [shells/zsh-completions](https://www.freshports.org/shells/zsh-completions) |
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Using zsh frameworks
|
### Using zsh frameworks
|
||||||
|
|
||||||
|
|
@ -35,61 +33,39 @@ Add `antigen bundle zsh-users/zsh-completions` to your `~/.zshrc`.
|
||||||
|
|
||||||
#### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
|
#### [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
|
||||||
|
|
||||||
To avoid issues with redundant `.zcompdump` cache generation (see [#603](https://github.com/zsh-users/zsh-completions/issues/603)), do **not** load `zsh-completions` as a standard plugin.
|
* Clone the repository inside your oh-my-zsh repo:
|
||||||
Instead, follow this optimized approach:
|
|
||||||
|
|
||||||
1. Clone the repository into your custom plugins directory:
|
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
|
||||||
|
|
||||||
```bash
|
* Add it to `FPATH` in your `.zshrc` by adding the following line before `source "$ZSH/oh-my-zsh.sh"`:
|
||||||
git clone https://github.com/zsh-users/zsh-completions.git \
|
|
||||||
${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Update your `~/.zshrc` configuration **before** sourcing oh-my-zsh:
|
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
||||||
|
|
||||||
```bash
|
Note: adding it as a regular Oh My ZSH! plugin will not work properly (see [#603](https://github.com/zsh-users/zsh-completions/issues/603)).
|
||||||
fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
|
|
||||||
autoload -U compinit && compinit
|
|
||||||
source "$ZSH/oh-my-zsh.sh"
|
|
||||||
```
|
|
||||||
|
|
||||||
This prevents `compinit` from being called twice and significantly improves shell startup time.
|
|
||||||
|
|
||||||
#### [zinit](https://github.com/zdharma-continuum/zinit)
|
#### [zinit](https://github.com/zdharma-continuum/zinit)
|
||||||
|
|
||||||
Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`.
|
Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`.
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Manual installation
|
### Manual installation
|
||||||
|
|
||||||
* Clone the repository:
|
* Clone the repository:
|
||||||
|
|
||||||
```bash
|
git clone https://github.com/zsh-users/zsh-completions.git
|
||||||
git clone https://github.com/zsh-users/zsh-completions.git
|
|
||||||
```
|
|
||||||
|
|
||||||
* Include the directory in your `$fpath`, for example by adding in `~/.zshrc`:
|
* Include the directory in your `$fpath`, for example by adding in `~/.zshrc`:
|
||||||
|
|
||||||
```bash
|
fpath=(path/to/zsh-completions/src $fpath)
|
||||||
fpath=(path/to/zsh-completions/src $fpath)
|
|
||||||
```
|
|
||||||
|
|
||||||
* You may have to force rebuild `zcompdump`:
|
* You may have to force rebuild `zcompdump`:
|
||||||
|
|
||||||
```bash
|
rm -f ~/.zcompdump; compinit
|
||||||
rm -f ~/.zcompdump; compinit
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
|
|
||||||
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
Completions use the Zsh license, unless explicitly mentioned in the file header.
|
||||||
Completions use the Zsh license, unless explicitly mentioned in the file header.
|
|
||||||
See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information.
|
See [LICENSE](https://github.com/zsh-users/zsh-completions/blob/master/LICENSE) for more information.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue