diff --git a/completions/tide.fish b/completions/tide.fish index 2d3784da..c0629489 100644 --- a/completions/tide.fish +++ b/completions/tide.fish @@ -1,12 +1,15 @@ complete tide --no-files -set -l subcommands bug-report configure +set -l subcommands bug-report configure remove 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_use_subcommand -a remove -d "Remove an item" 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" + +complete tide -x -n '__fish_seen_subcommand_from remove' -a "\$tide_left_prompt_items \$tide_right_prompt_items" diff --git a/functions/_tide_sub_remove.fish b/functions/_tide_sub_remove.fish new file mode 100644 index 00000000..e7b19cba --- /dev/null +++ b/functions/_tide_sub_remove.fish @@ -0,0 +1,12 @@ +function _tide_sub_remove + for item in $argv + if _tide_find_and_remove $item tide_left_prompt_items || + _tide_find_and_remove $item tide_right_prompt_items + echo "Removed $item" + else + echo "$item not found" + end + end + _tide_cache_variables + return 0 +end