diff --git a/completion/_timertab b/completion/_timertab new file mode 100644 index 0000000..59afeb1 --- /dev/null +++ b/completion/_timertab @@ -0,0 +1,8 @@ +#compdef timertab +# This is a Zsh completion script. +# It should be placed in /usr/share/zsh/functions/Completion/Zsh +# If you intall timertab from the AUR, that will be done automatically + +local -a subcmds +subcmds=($(timertab list_opts)) +_describe 'command' subcmds diff --git a/completion/timertab_completion b/completion/timertab_completion new file mode 100644 index 0000000..8f17fa5 --- /dev/null +++ b/completion/timertab_completion @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# This is a Bash completion script +# It should be placed in /etc/bash_completion.d/ +# If you intall timertab from the AUR, that will be done automatically + +abs_path="/usr/bin/timertab" + +_script() { + local cur commands + commands=$($abs_path list_opts) + cur="${COMP_WORDS[COMP_CWORD]}" + COMPREPLY=() + COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) + + return 0 +} + +complete -o nospace -F _script timertab