initial commit
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
__punch_complete() {
|
||||
local cmd=$1
|
||||
local cur=$2
|
||||
local prev=$3
|
||||
if [ $COMP_CWORD -eq 1 ]; then
|
||||
COMPREPLY=( $(compgen -W "$(punch|grep '^ '|sed 's/^ //'|cut -d' ' -f1)" -- $cur) )
|
||||
else
|
||||
case "${COMP_WORDS[1]}" in
|
||||
start) [ $COMP_CWORD -eq 2 ] && COMPREPLY=( $(compgen -W "$(punch ls)" -- $cur) ) ;;
|
||||
today|week|cat|rm) COMPREPLY=( $(compgen -W "$(punch ls)" -- $cur) ) ;;
|
||||
esac
|
||||
fi
|
||||
} &&
|
||||
complete -F __punch_complete punch
|
||||
Reference in New Issue
Block a user