mirror of
https://github.com/IlanCosman/tide.git
synced 2024-11-22 05:23:22 +03:00
Add remove subcommand
This commit is contained in:
parent
73c7b469aa
commit
b970f41a38
@ -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"
|
||||
|
12
functions/_tide_sub_remove.fish
Normal file
12
functions/_tide_sub_remove.fish
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user