Shell Completion
Papis has shell completion for bash
, fish
and zsh
through the
click framework
that comes with it when installed through pip
. To control the directory
in which the completions gets installed use the environment variables
PAPIS_<SHELL>_COMPLETION_DIR=my/custom/directory
where <SHELL>
is the uppercase name of the shell (e.g. BASH
) and the
paths are considered subdirectories of the chosen prefix. The default paths for
each shell are given below.
bash
: the completion script is installed in$PREFIX/share/bash-completion/completions
and works directly with the bash-completion package. It can also be sourced manually using (or added to your.bashrc
)source $PREFIX/share/bash-completion/completions/papis.bash
fish
: the completion script is installed in$PREFIX/share/fish/vendor_completions.d
, which should be sourced automatically (see the fish docs for more details). It can also be sourced manually using (or added to yourconfig.fish
)source $PREFIX/share/fish/vendor_completions.d/papis.fish
zsh
: the completion script is installed in$PREFIX/share/zsh/site-functions
, which is sourced automatically starting with version5.0.7
(see the zsh docs for more details). It can also be sourced manually using (or added to your.zshrc
)source $PREFIX/share/zsh/site-functions/_papis
Alternatively, the completion can be generated on-the-fly by running (see more in the click docs)
eval "$(_PAPIS_COMPLETE=<shell>_source papis)"
where <shell>
is one of the shells supported by click
. Note that older
versions of click
used source_<shell>
instead for the values of
_PAPIS_COMPLETE
.