mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
Completions: Don't check $cmd[1]
This is already done by fish before calling the completion. It breaks completion with combiners (#2025) and also with wrappers. (This does not include git because that's better solved in #2145)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
function __fish_brew_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'brew' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
function __fish_bundle_no_command --description 'Test if bundle has been given no subcommand'
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'bundle' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
function __fish_composer_needs_command
|
||||
set cmd (commandline -opc)
|
||||
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'composer' ]
|
||||
return 0
|
||||
end
|
||||
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'composer.phar' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ end
|
||||
|
||||
function __fish_heroku_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'heroku' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_lein_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'lein' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_mix_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'mix' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_netctl_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'netctl' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
function __fish_npm_needs_command
|
||||
set cmd (commandline -opc)
|
||||
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'npm' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ end
|
||||
|
||||
function __fish_opam_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'opam' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
function __fish_rbenv_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'rbenv' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_ruby-build_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'ruby-build' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
function __fish_travis_needs_command
|
||||
set cmd (commandline -opc)
|
||||
if [ (count $cmd) -eq 1 -a $cmd[1] = 'travis' ]
|
||||
if [ (count $cmd) -eq 1 ]
|
||||
return 0
|
||||
end
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user