Make funced properly handle an invalid number of arguments

Fixes https://github.com/fish-shell/fish-shell/issues/780
This commit is contained in:
ridiculousfish 2013-06-08 20:29:38 -07:00
parent 09b0213738
commit 825a7311ea

View file

@ -31,7 +31,7 @@ function funced --description 'Edit function definition'
set -e argv[1]
end
if begin; set -q funcname[2]; or not test "$funcname[1]"; end
if test (count $funcname) -ne 1
set_color red
_ "funced: You must specify one function name
"