diff options
author | 2007-08-01 07:23:32 +1000 | |
---|---|---|
committer | 2007-08-01 07:23:32 +1000 | |
commit | 91de143003c17571f028a06db23086758b16697f (patch) | |
tree | 87629e0ffcf45655fb80bde8aeb909db4f1e366d /share | |
parent | 748d726ddfb068fe10c54cf5c83f76fba87f9c18 (diff) |
Replace the count function with a builtin for performance reasons. The count function used at least two forks, which was noticable on systems such as OS X with slow forks
darcs-hash:20070731212332-ac50b-8f5b2e70008ddb131dc8bae3f361d8d65a294948.gz
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/count.fish | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/share/functions/count.fish b/share/functions/count.fish deleted file mode 100644 index 1ddb30b5..00000000 --- a/share/functions/count.fish +++ /dev/null @@ -1,11 +0,0 @@ - -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 |