diff options
author | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
---|---|---|
committer | Aditya <bluenerd@protonmail.com> | 2023-02-27 20:04:56 +0530 |
commit | edc449275b6c04445f58b108ca0937a87c1e8430 (patch) | |
tree | 9fd484d58145b616f29a78857cc0b1c8b1c18f05 /oh-my-zsh/plugins/compleat | |
parent | 6f5424ca96c4221ef433f545642669e9c104d0ed (diff) |
add zsh
Diffstat (limited to 'oh-my-zsh/plugins/compleat')
-rw-r--r-- | oh-my-zsh/plugins/compleat/README.md | 9 | ||||
-rw-r--r-- | oh-my-zsh/plugins/compleat/compleat.plugin.zsh | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/oh-my-zsh/plugins/compleat/README.md b/oh-my-zsh/plugins/compleat/README.md new file mode 100644 index 0000000..af0e383 --- /dev/null +++ b/oh-my-zsh/plugins/compleat/README.md @@ -0,0 +1,9 @@ +# compleat plugin + +This plugin looks for [compleat](https://github.com/mbrubeck/compleat) and loads its completion. + +To use it, add compleat to the plugins array in your zshrc file: + +```zsh +plugins=(... compleat) +``` diff --git a/oh-my-zsh/plugins/compleat/compleat.plugin.zsh b/oh-my-zsh/plugins/compleat/compleat.plugin.zsh new file mode 100644 index 0000000..38f1b39 --- /dev/null +++ b/oh-my-zsh/plugins/compleat/compleat.plugin.zsh @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------------------ +# FILE: compleat.plugin.zsh +# DESCRIPTION: oh-my-zsh plugin file. +# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com) +# VERSION: 1.0.0 +# ------------------------------------------------------------------------------ + +if (( ${+commands[compleat]} )); then + local prefix="${commands[compleat]:h:h}" + local setup="${prefix}/share/compleat-1.0/compleat_setup" + + if [[ -f "$setup" ]]; then + if ! bashcompinit >/dev/null 2>&1; then + autoload -U bashcompinit + bashcompinit -i + fi + + source "$setup" + fi +fi |