Improve completions

This commit is contained in:
Ilan Cosman 2021-11-12 15:48:20 -08:00
parent ac63f94075
commit 1ebc8d618c
2 changed files with 8 additions and 5 deletions

View File

@ -1,9 +1,12 @@
complete tide --no-files
complete tide -x -n __fish_use_subcommand -a --help -d "Print help message"
complete tide -x -n __fish_use_subcommand -a --version -d "Print tide version"
set -l subcommands bug-report configure
complete tide -x -n __fish_use_subcommand -a bug-report -d "Print info for use in bug reports"
complete tide -x -n __fish_use_subcommand -a configure -d "Run the configuration wizard"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -a --clean -d "Run clean Fish instance and install Tide"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -a --verbose -d "Print full Tide configuration"
complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s h -l help -d "Print help message"
complete tide -x -n "not __fish_seen_subcommand_from $subcommands" -s v -l version -d "Print tide version"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -l clean -d "Run clean Fish instance and install Tide"
complete tide -x -n '__fish_seen_subcommand_from bug-report' -l verbose -d "Print full Tide configuration"

View File

@ -1,4 +1,4 @@
function tide
function tide --description "Manage your Tide prompt"
argparse --stop-nonopt v/version h/help -- $argv
if set -q _flag_version