From 42c90ec20dd47009d9b197652eff176ef4c23215 Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Sun, 31 Aug 2014 05:18:50 -0400 Subject: [PATCH] Add bash and zsh completions for llpp --- misc/completions/README | 25 +++++++++++++++++++++++++ misc/completions/bash/llpp | 1 + misc/completions/zsh/_llpp | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 misc/completions/README create mode 100644 misc/completions/bash/llpp create mode 100644 misc/completions/zsh/_llpp diff --git a/misc/completions/README b/misc/completions/README new file mode 100644 index 0000000..29115df --- /dev/null +++ b/misc/completions/README @@ -0,0 +1,25 @@ +Shell completion +================ + +This directory contains files for enabling tab completion in user shells. +Instruction for some shells follows: + +Bash +---- + +If you have `bash-completion` installed, you can install `llpp` in the `bash/` +directory into wherever that package's completions are stored, typically in +`/usr/share/bash-completion/completions/`. Alternatively, you can just copy +the contents into or source it in your `~/.bashrc`. + +Zsh +--- + +To enable completion for `llpp`, install `_llpp` to a directory in zsh's +`$fpath`. Packages generally put their zsh completions in the directory +`/usr/share/zsh/site-functions/`. Alternatively, for the same effect, one can +add something like: + + compdef "_files -g '*.(pdf|xps|zip|cbz|jpg|png)'" llpp + +to `.zshrc`. diff --git a/misc/completions/bash/llpp b/misc/completions/bash/llpp new file mode 100644 index 0000000..68a4e0b --- /dev/null +++ b/misc/completions/bash/llpp @@ -0,0 +1 @@ +complete -f -X '!*.@(pdf|xps|zip|cbz|jpg|jpeg|png)' -o plusdirs llpp diff --git a/misc/completions/zsh/_llpp b/misc/completions/zsh/_llpp new file mode 100644 index 0000000..9ecdb57 --- /dev/null +++ b/misc/completions/zsh/_llpp @@ -0,0 +1,3 @@ +#compdef llpp + +_files -g '*.(pdf|xps|zip|cbz|jpg|jpeg|png)' -- 2.11.4.GIT