2021-07-29 11:02:22 -05:00
|
|
|
#!/bin/bash
|
|
|
|
_tiempo ()
|
|
|
|
{
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
cmd="${COMP_WORDS[1]}"
|
|
|
|
|
2021-07-30 17:54:35 -05:00
|
|
|
if [[ ( $cmd = s* || $cmd = d* || $cmd = k* ) && "$COMP_CWORD" = 2 ]]; then
|
2022-08-26 11:30:09 -05:00
|
|
|
COMPREPLY=($(compgen -W "$(echo "select distinct sheet from entries where sheet not like '\_%';" | t b)" $cur))
|
2021-07-29 11:02:22 -05:00
|
|
|
return
|
|
|
|
elif [[ "$COMP_CWORD" = 1 ]]; then
|
|
|
|
CMDS="archive backend configure display edit in kill list now out resume sheet week month"
|
|
|
|
COMPREPLY=($(compgen -W "$CMDS" $cur))
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-08-26 11:30:09 -05:00
|
|
|
complete -F _tiempo 't'
|