From edc449275b6c04445f58b108ca0937a87c1e8430 Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 27 Feb 2023 20:04:56 +0530 Subject: add zsh --- oh-my-zsh/plugins/compleat/README.md | 9 +++++++++ oh-my-zsh/plugins/compleat/compleat.plugin.zsh | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 oh-my-zsh/plugins/compleat/README.md create mode 100644 oh-my-zsh/plugins/compleat/compleat.plugin.zsh (limited to 'oh-my-zsh/plugins/compleat') 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 -- cgit v1.2.3