| 1 |
|
| 2 |
|
| 3 |
function __fish_greet_no_subcommand --description 'Test if there has been any subcommand yet' |
| 4 |
for i in (commandline -opc) |
| 5 |
if contains -- $i config c info i in some-command hidden-command usage u |
| 6 |
return 1 |
| 7 |
end |
| 8 |
end |
| 9 |
return 0 |
| 10 |
end |
| 11 |
|
| 12 |
complete -c greet -n '__fish_greet_no_subcommand' -l socket -s s -r -d 'some \'usage\' text' |
| 13 |
complete -c greet -n '__fish_greet_no_subcommand' -f -l flag -s fl -s f -r |
| 14 |
complete -c greet -n '__fish_greet_no_subcommand' -f -l another-flag -s b -d 'another usage text' |
| 15 |
complete -c greet -n '__fish_greet_no_subcommand' -l logfile -r |
| 16 |
complete -c greet -n '__fish_greet_no_subcommand' -l foofile -r |
| 17 |
complete -x -c greet -n '__fish_greet_no_subcommand' -a 'config' -d 'another usage test' |
| 18 |
complete -c greet -n '__fish_seen_subcommand_from config c' -l flag -s fl -s f -r |
| 19 |
complete -c greet -n '__fish_seen_subcommand_from config c' -f -l another-flag -s b -d 'another usage text' |
| 20 |
complete -c greet -n '__fish_seen_subcommand_from config c' -f -l help -s h -d 'show help' |
| 21 |
complete -x -c greet -n '__fish_seen_subcommand_from config c; and not __fish_seen_subcommand_from sub-config s ss help h' -a 'sub-config' -d 'another usage test' |
| 22 |
complete -c greet -n '__fish_seen_subcommand_from config c; and __fish_seen_subcommand_from sub-config s ss' -f -l sub-flag -s sub-fl -s s -r |
| 23 |
complete -c greet -n '__fish_seen_subcommand_from config c; and __fish_seen_subcommand_from sub-config s ss' -f -l sub-command-flag -s s -d 'some usage text' |
| 24 |
complete -c greet -n '__fish_seen_subcommand_from config c; and __fish_seen_subcommand_from sub-config s ss' -f -l help -s h -d 'show help' |
| 25 |
complete -x -c greet -n '__fish_seen_subcommand_from config c; and __fish_seen_subcommand_from sub-config s ss; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 26 |
complete -x -c greet -n '__fish_seen_subcommand_from config c; and not __fish_seen_subcommand_from sub-config s ss help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 27 |
complete -x -c greet -n '__fish_greet_no_subcommand' -a 'info' -d 'retrieve generic information' |
| 28 |
complete -c greet -n '__fish_seen_subcommand_from info i in' -f -l help -s h -d 'show help' |
| 29 |
complete -x -c greet -n '__fish_seen_subcommand_from info i in; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 30 |
complete -x -c greet -n '__fish_greet_no_subcommand' -a 'some-command' |
| 31 |
complete -c greet -n '__fish_seen_subcommand_from some-command' -f -l help -s h -d 'show help' |
| 32 |
complete -x -c greet -n '__fish_seen_subcommand_from some-command; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 33 |
complete -c greet -n '__fish_seen_subcommand_from hidden-command' -f -l completable |
| 34 |
complete -c greet -n '__fish_seen_subcommand_from hidden-command' -f -l help -s h -d 'show help' |
| 35 |
complete -x -c greet -n '__fish_seen_subcommand_from hidden-command; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 36 |
complete -x -c greet -n '__fish_greet_no_subcommand' -a 'usage' -d 'standard usage text' |
| 37 |
complete -c greet -n '__fish_seen_subcommand_from usage u' -l flag -s fl -s f -r |
| 38 |
complete -c greet -n '__fish_seen_subcommand_from usage u' -f -l another-flag -s b -d 'another usage text' |
| 39 |
complete -c greet -n '__fish_seen_subcommand_from usage u' -f -l help -s h -d 'show help' |
| 40 |
complete -x -c greet -n '__fish_seen_subcommand_from usage u; and not __fish_seen_subcommand_from sub-usage su help h' -a 'sub-usage' -d 'standard usage text' |
| 41 |
complete -c greet -n '__fish_seen_subcommand_from usage u; and __fish_seen_subcommand_from sub-usage su' -f -l sub-command-flag -s s -d 'some usage text' |
| 42 |
complete -c greet -n '__fish_seen_subcommand_from usage u; and __fish_seen_subcommand_from sub-usage su' -f -l help -s h -d 'show help' |
| 43 |
complete -x -c greet -n '__fish_seen_subcommand_from usage u; and __fish_seen_subcommand_from sub-usage su; and not __fish_seen_subcommand_from help h' -a 'help' -d 'Shows a list of commands or help for one command' |
| 44 |
complete -x -c greet -n '__fish_seen_subcommand_from usage u; and not __fish_seen_subcommand_from sub-usage su help h' -a 'help' -d 'Shows a list of commands or help for one command' |