# Also print the command, so this can be used to figure out what it is.
echo$argv[1]
return1
end
return0
end
function__fish_my_app_using_subcommand
set-lcmd(__fish_my_app_needs_command)
test-z"$cmd"
andreturn1
contains-- $cmd[1]$argv
end
complete-c my-app -n"__fish_my_app_needs_command"-s c
complete-c my-app -n"__fish_my_app_needs_command"-s v
complete-c my-app -n"__fish_my_app_needs_command"-s h -lhelp-d'Print help'
complete-c my-app -n"__fish_my_app_needs_command"-f-a"test"-d'Subcommand with a second line'
complete-c my-app -n"__fish_my_app_needs_command"-f-a"help"-d'Print this message or the help of the given subcommand(s)'
complete-c my-app -n"__fish_my_app_using_subcommand test"-s d
complete-c my-app -n"__fish_my_app_using_subcommand test"-s c
complete-c my-app -n"__fish_my_app_using_subcommand test"-s h -lhelp-d'Print help'
complete-c my-app -n"__fish_my_app_using_subcommand help; and not __fish_seen_subcommand_from test help"-f-a"test"-d'Subcommand with a second line'
complete-c my-app -n"__fish_my_app_using_subcommand help; and not __fish_seen_subcommand_from test help"-f-a"help"-d'Print this message or the help of the given subcommand(s)'