_using_subcommand__fish_use_subcommand__fish_seen_subcommand_from\,complete -c -n "; and not __fish_seen_subcommand_from; and __fish_seen_subcommand_from -a " -d '# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. function end function # Figure out if the current invocation already has a command. set -l cmd (commandline -opc) set -e cmd[1] argparse -s () -- $cmd 2>/dev/null or return if set -q argv[1] # Also print the command, so this can be used to figure out what it is. echo $argv[1] return 1 end return 0 end function set -l cmd () test -z "$cmd" and return 1 contains -- $cmd[1] $argv end -r -f -a "{}" -r -r -f -a "(__fish_complete_directories)" -r -F -r -f -a "(__fish_complete_command)" -r -f -a "(__fish_complete_users)" -r -f -a "(__fish_print_hostnames)" -r -f