diff --git a/completions/pond.fish b/completions/pond.fish index 55e5e302..cc609dea 100644 --- a/completions/pond.fish +++ b/completions/pond.fish @@ -1,4 +1,4 @@ -set -l commands_without_options edit enable disable load status +set -l commands_without_options edit enable disable load status list set -l commands_with_options create remove drain unload set -l commands "$commands_without_options $commands_with_options" @@ -8,6 +8,7 @@ complete -c pond -f # Complete commands if no subcommand has been given so far complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'create' -d 'Create a new pond' complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'remove' -d 'Remove a pond and associated data' +complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'list' -d 'List all ponds' complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'edit' -d 'Edit an existing pond' complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'enable' -d 'Enable a pond for new shell sessions' complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'disable' -d 'Disable a pond for new shell sessions' @@ -17,7 +18,7 @@ complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'status' -d ' complete -c pond -n "not __fish_seen_subcommand_from $commands" -a 'drain' -d 'Drain all data from pond' # Complete pond name for commands that do not support options -complete -c pond -n "__fish_seen_subcommand_from $commands_without_options; and not __fish_seen_subcommand_from (pond list 2>/dev/null)" -a "(pond list 2>/dev/null)" +complete -c pond -n "__fish_seen_subcommand_from $commands_without_options; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from (pond list 2>/dev/null)" -a "(pond list 2>/dev/null)" # Complete options for create command complete -c pond -n "__fish_seen_subcommand_from create; and not __fish_seen_subcommand_from -e --empty" -a "-e --empty" -d "Create pond without opening editor" diff --git a/functions/pond.fish b/functions/pond.fish index 311abaea..263c339c 100644 --- a/functions/pond.fish +++ b/functions/pond.fish @@ -16,7 +16,7 @@ Application Options: Commands: create Create a new pond remove Remove a pond and associated data - list List ponds + list List all ponds edit Edit an existing pond enable Enable a pond for new shell sessions disable Disable a pond for new shell sessions diff --git a/test/options.fish b/test/options.fish index 5c69cb87..c1760a06 100644 --- a/test/options.fish +++ b/test/options.fish @@ -18,7 +18,7 @@ Application Options: Commands: create Create a new pond remove Remove a pond and associated data - list List ponds + list List all ponds edit Edit an existing pond enable Enable a pond for new shell sessions disable Disable a pond for new shell sessions