From 33341730705889167c7b5feac669add7e5280972 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 13 Jul 2015 23:20:36 +0200 Subject: zsh: Add custom completions --- zsh/.zshrc | 2 ++ zsh/completion/_5c | 4 ++++ zsh/completion/_5v | 4 ++++ zsh/completion/_aur | 4 ++++ 4 files changed, 14 insertions(+) create mode 100644 zsh/completion/_5c create mode 100644 zsh/completion/_5v create mode 100644 zsh/completion/_aur (limited to 'zsh') diff --git a/zsh/.zshrc b/zsh/.zshrc index d61bafb..2e628c8 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -9,6 +9,8 @@ zstyle ':completion:*' menu select zstyle ':completion:*' use-cache on zstyle ':completion:*' rehash yes +fpath=("$ZDOTDIR"/completion "${fpath[@]}") + autoload -Uz colors \ compinit \ promptinit \ diff --git a/zsh/completion/_5c b/zsh/completion/_5c new file mode 100644 index 0000000..ca7eeac --- /dev/null +++ b/zsh/completion/_5c @@ -0,0 +1,4 @@ +#compdef 5c + +_arguments \ + "1: :($(print $HOME/5/code/*(/) | xargs -n1 basename))" diff --git a/zsh/completion/_5v b/zsh/completion/_5v new file mode 100644 index 0000000..3958269 --- /dev/null +++ b/zsh/completion/_5v @@ -0,0 +1,4 @@ +#compdef 5v + +_arguments \ + "1: :($(print $HOME/5/venvs/*(/) | xargs -n1 basename))" diff --git a/zsh/completion/_aur b/zsh/completion/_aur new file mode 100644 index 0000000..83a359c --- /dev/null +++ b/zsh/completion/_aur @@ -0,0 +1,4 @@ +#compdef aur-push aur-pull + +_arguments \ + "1: :($(git for-each-ref --format='%(refname:short)' refs/heads))" -- cgit v1.2.3-70-g09d2