dotfiles/home/.bash_completion.d/oath

11 lines
203 B
Text
Raw Permalink Normal View History

2021-08-26 10:40:51 +02:00
function _oath_completion() {
if [ -n "$2" ]; then
WORD=$2
mapfile -t COMPREPLY < <(grep -i $2 ~/.oath_tokens)
else
mapfile -t COMPREPLY < ~/.oath_tokens
fi
}
complete -F _oath_completion oath