From ace10632b60d783c1089a73e6898b4ec31fab9c3 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Sun, 21 Sep 2014 11:15:02 +0100 Subject: zshrc: custom completion --- .zsh/completions/_net-profile | 3 +++ .zshrc | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 .zsh/completions/_net-profile diff --git a/.zsh/completions/_net-profile b/.zsh/completions/_net-profile new file mode 100644 index 0000000..2c51335 --- /dev/null +++ b/.zsh/completions/_net-profile @@ -0,0 +1,3 @@ +#compdef net-profile + +_arguments "1: :($(ls -1 ~/.net_profiles | cut -d '.' -f 1))" diff --git a/.zshrc b/.zshrc index 5ad64a7..1233994 100644 --- a/.zshrc +++ b/.zshrc @@ -1,8 +1,10 @@ zstyle ':completion:*' completer _complete _ignored zstyle :compinstall filename '~/.zshrc' +fpath=(~/.zsh/completions $fpath) autoload -Uz compinit promptinit compinit promptinit +zstyle ':completion:*' menu select=2 zstyle ':completion:*' completer _complete _ignored HISTFILE=~/.zshistory HISTSIZE=1000 -- cgit v1.2.3