Minor performance tweaks

darcs-hash:20051102154159-ac50b-9a32fb6cc654c593048840ebd9f6abb97c2e0bb8.gz
This commit is contained in:
axel
2005-11-03 01:41:59 +10:00
parent c8c3715aac
commit 8d58e58d7b
10 changed files with 53 additions and 49 deletions

View File

@@ -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