Skip to content

Commit

Permalink
Adding the completion files
Browse files Browse the repository at this point in the history
  • Loading branch information
amlamarra committed Nov 11, 2017
1 parent 8263f3e commit 2859782
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions completion/_timertab
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions completion/timertab_completion
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2859782

Please sign in to comment.