Actually add the count function. Thanks to Tassilo Horn for the report.

darcs-hash:20070424153317-ac50b-f6ab71ad0ea9d74351169d18f1dc856a442ee3f4.gz
This commit is contained in:
axel 2007-04-25 01:33:17 +10:00
parent c00e1fcf26
commit 52e7a7ec1c

View file

@ -0,0 +1,11 @@
function count --description "Count the number of elements of an array"
set -l lines ''
set result 1
for i in $argv
set lines $lines\n
set result 0
end
echo -n $lines|wc -l
return $result
end