mirror of
https://github.com/IlanCosman/tide.git
synced 2024-08-16 19:50:22 +03:00
Remove uninstall from tide completions
This commit is contained in:
parent
ad9f53b5d4
commit
914c6bc7c6
@ -1,7 +1,8 @@
|
||||
set -l subcommands (printf '%s ' (basename -a -s '.fish' $_tide_dir/functions/*))
|
||||
set -l uninstallIndex (contains -i uninstall $_tide_subcommands)
|
||||
set -l subcommandsWithoutUninstall (printf '%s ' $_tide_subcommands[1..(math $uninstallIndex-1)] $_tide_subcommands[(math $uninstallIndex+1)..-1])
|
||||
|
||||
# Disable file completions for the entire command
|
||||
complete -c tide -f
|
||||
|
||||
# Offer subcommands if no subcommand has been given so far
|
||||
complete -c tide -n "not __fish_seen_subcommand_from $subcommands" -a $subcommands
|
||||
complete -c tide -n "not __fish_seen_subcommand_from $subcommandsWithoutUninstall" -a $subcommandsWithoutUninstall
|
@ -7,14 +7,13 @@ function tide
|
||||
return 0
|
||||
end
|
||||
|
||||
set -l tideSubcommand "tide_$subcommand"
|
||||
set -l tideCommands (basename -a -s '.fish' $_tide_dir/functions/*)
|
||||
set -l actual_command_name "tide_$subcommand"
|
||||
|
||||
if contains $subcommand $tideCommands
|
||||
if contains $subcommand $_tide_subcommands
|
||||
source "$_tide_dir/functions/$subcommand.fish"
|
||||
$tideSubcommand $argv[2..-1]
|
||||
$actual_command_name $argv[2..-1]
|
||||
else
|
||||
tide help
|
||||
end
|
||||
functions -e $tideSubcommand
|
||||
functions -e $actual_command_name
|
||||
end
|
@ -79,6 +79,7 @@ function _set_immutables
|
||||
|
||||
_set_immutable _tide_version 2.0.0
|
||||
_set_immutable _tide_dir "$__fish_config_dir/tide_theme"
|
||||
_set_immutable _tide_subcommands (basename -s '.fish' $_tide_dir/functions/*)
|
||||
# --------------Colors--------------
|
||||
_set_immutable _tide_color_green 5FD700
|
||||
_set_immutable _tide_color_light_blue 00AFFF
|
||||
|
Loading…
Reference in New Issue
Block a user