That >
isn't doing a comparison, it's output redirection. That is, it's taking the output of
count $argv
and writing it into a file called 0
. You probably want something like:
function ga
if [ (count $argv) -gt 0 ]
git add $argv
else
git add .
end
end