17 lines
701 B
Fish
17 lines
701 B
Fish
|
# tiempo does not accept files as arguments
|
||
|
complete --command t --no-files
|
||
|
|
||
|
# define all subcommands
|
||
|
set -l sheetcommandslong display kill sheet week month
|
||
|
set -l sheetcommandsshort d k s w m
|
||
|
set -l sheetcommandsall $sheetcommandslong $sheetcommandsshort
|
||
|
set -l commandslong archive backend configure edit in list now out resume
|
||
|
set -l commandsshort a b c e i l n o r
|
||
|
set -l subcommands $sheetcommandslong $commandslong $sheetcommandsshort $commandsshort
|
||
|
|
||
|
# add subcommands
|
||
|
complete --command t --condition "not __fish_seen_subcommand_from $subcommands" -a "$subcommands"
|
||
|
|
||
|
# complete sheet name
|
||
|
complete --command t --condition "__fish_seen_subcommand_from $sheetcommandsall" -a "(t l --all --flat)"
|