summaryrefslogtreecommitdiff
path: root/oh-my-zsh/plugins/compleat
diff options
context:
space:
mode:
Diffstat (limited to 'oh-my-zsh/plugins/compleat')
-rw-r--r--oh-my-zsh/plugins/compleat/README.md9
-rw-r--r--oh-my-zsh/plugins/compleat/compleat.plugin.zsh20
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