930 B
930 B
title |
---|
Abra |
Enable auto-completion
Bash
Copy scripts/autocomplete/bash
into /etc/bash_completion.d/
and rename
it to abra.
sudo cp scripts/autocomplete/bash /etc/bash_completion.d/abra
source /etc/bash_completion.d/abra
In development, you can source the script in your git checkout, just make sure
to set PROG=abra
, otherwise it'll add completion to the wrong command:
PROG=abra source /path/to/abra/scripts/autocomplete/bash
(Fi)Zsh
(fi)zsh doesn't have an autocompletion folder by default but you can create one, then copy scripts/autocomplete/zsh
into it and add a couple lines to your ~/.zshrc
or ~/.fizsh/.fizshrc
sudo mkdir /etc/zsh/completion.d/
sudo cp scripts/autocomplete/zsh /etc/zsh/completion.d/abra
echo "PROG=abra\n_CLI_ZSH_AUTOCOMPLETE_HACK=1\nsource /etc/zsh/completion.d/abra" >> ~/.zshrc
(replace .zshrc with ~/.fizsh/.fizshrc if you use fizsh)