mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
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:
parent
1e3a46f423
commit
882da75d29
2 changed files with 1 additions and 24 deletions
|
@ -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 -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
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue