summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-09-21 11:15:02 +0100
committerPatrick Simianer <p@simianer.de>2014-09-21 11:15:02 +0100
commitace10632b60d783c1089a73e6898b4ec31fab9c3 (patch)
tree1527f63b84dd8fe0fe726cf5486a2b8e7042d9e7
parentbc83848cfe08002d8a916b1f8329b50a9a39984d (diff)
zshrc: custom completion
-rw-r--r--.zsh/completions/_net-profile3
-rw-r--r--.zshrc2
2 files changed, 5 insertions, 0 deletions
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