mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-26 22:21:16 -03:00
Minor performance tweaks
darcs-hash:20051102154159-ac50b-9a32fb6cc654c593048840ebd9f6abb97c2e0bb8.gz
This commit is contained in:
@@ -32,7 +32,7 @@ function _contains_help -d "Helper function for contains"
|
||||
end
|
||||
|
||||
function contains -d "Test if a key is contained in a set of values"
|
||||
while count $argv >/dev/null
|
||||
while set -q argv
|
||||
switch $argv[1]
|
||||
case '-h' '--h' '--he' '--hel' '--help'
|
||||
_contains_help
|
||||
@@ -56,8 +56,7 @@ function contains -d "Test if a key is contained in a set of values"
|
||||
set -e argv[1]
|
||||
end
|
||||
|
||||
if count $argv >/dev/null
|
||||
else
|
||||
if not set -q argv
|
||||
echo "contains: Key not specified"
|
||||
return 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user