Remove __fish_commandline_test function

This was only ever used in the commandline completions, and is
equivalent to (a weird example of) __fish_contains_opt.

Part of #5279.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-01-26 19:08:54 +01:00
parent 1e3a46f423
commit 882da75d29
2 changed files with 1 additions and 24 deletions

View File

@ -20,4 +20,4 @@ complete -c commandline -s S -l search-mode -d "Return true if performing a hist
complete -c commandline -s P -l paging-mode -d "Return true if showing pager content"
complete -c commandline -n __fish_commandline_test -a '(bind --function-names)' -d 'Function name' -x
complete -c commandline -n '__fish_contains_opt -s f function' -a '(bind --function-names)' -d 'Function name' -x

View File

@ -1,23 +0,0 @@
function __fish_commandline_test
set -l is_function no
for i in (commandline -poc)
switch $i
case -f --f --fu --fun --func --funct --functi --functio --function
set is_function yes
case --
break
end
end
switch $is_function
case yes
return 0
end
return 1
end