tealdeer/bash_tealdeer
Danilo Bargen 978debe6ae Implement new --show-dirs command
The command prints out the different directories (config, cache, etc)
used by tealdeer.
2021-01-30 21:32:39 +01:00

34 lines
697 B
Bash

# tealdeer bash completion
_tealdeer()
{
local cur prev words cword
_init_completion || return
case $prev in
-h|--help|-v|--version|-l|--list|-u|--update|-c|--clear-cache|-p|--pager|-m|--markdown|--show-paths|--seed-config|-q|--quiet)
return
;;
-f|--render)
_filedir
return
;;
-o|--os)
COMPREPLY=( $(compgen -W 'linux osx sunos windows' -- "${cur}") )
return
;;
--color)
COMPREPLY=( $(compgen -W 'always auto never' -- "${cur}") )
return
;;
esac
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
return
fi
COMPREPLY=( $(compgen -W '$( tldr -l | tr -d , )' -- "${cur}") )
}
complete -F _tealdeer tldr