mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Remove __fish_bind_test* functions
These were only used in the bind completions, so there's no need to keep these two separate. Part of #5279. [ci skip]
This commit is contained in:
parent
354c6b1b67
commit
1e3a46f423
3 changed files with 44 additions and 43 deletions
|
@ -1,3 +1,47 @@
|
|||
function __fish_bind_test1
|
||||
set -l args
|
||||
set -l use_keys no
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case -k --k --ke --key
|
||||
set use_keys yes
|
||||
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set -a args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch $use_keys
|
||||
case yes
|
||||
switch (count $args)
|
||||
case 1
|
||||
return 0
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
||||
|
||||
function __fish_bind_test2
|
||||
set -l args
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set -a args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch (count $args)
|
||||
case 2
|
||||
return 0
|
||||
end
|
||||
|
||||
return 1
|
||||
|
||||
end
|
||||
|
||||
complete -c bind -s a -l all -d 'Show unavailable key bindings/erase all bindings'
|
||||
complete -c bind -s e -l erase -d 'Erase mode'
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
function __fish_bind_test1
|
||||
set -l args
|
||||
set -l use_keys no
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case -k --k --ke --key
|
||||
set use_keys yes
|
||||
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set -a args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch $use_keys
|
||||
case yes
|
||||
switch (count $args)
|
||||
case 1
|
||||
return 0
|
||||
end
|
||||
end
|
||||
return 1
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
function __fish_bind_test2
|
||||
set -l args
|
||||
for i in (commandline -poc)
|
||||
switch $i
|
||||
case "-*"
|
||||
|
||||
case "*"
|
||||
set -a args $i
|
||||
end
|
||||
end
|
||||
|
||||
switch (count $args)
|
||||
case 2
|
||||
return 0
|
||||
end
|
||||
|
||||
return 1
|
||||
|
||||
end
|
Loading…
Reference in a new issue