Renamed references to the previous command name of save_function to
funcsave, and returned an error after printing the help text when no
arguments are specified.
---
share/functions/funcsave.fish | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/share/functions/funcsave.fish b/share/functions/funcsave.fish
index ff9cabb..a1725ca 100644
--- a/share/functions/funcsave.fish
+++ b/share/functions/funcsave.fish
@@ -4,11 +4,13 @@ function funcsave --description "Save the current definition
of all specified fu
if count $argv >/dev/null
switch $argv[1]
case -h --h --he --hel --help
- __fish_print_help save_function
+ __fish_print_help funcsave
return 0
end
else
- __fish_print_help save_function
+ printf (_ "%s: Expected function name\n") funcsave
+ __fish_print_help funcsave
+ return 1
end
set -l res 0
@@ -21,7 +23,7 @@ function funcsave --description "Save the current definition
of all specified fu
for i in $configdir $configdir/fish $configdir/fish/functions
if not test -d $i
if not command mkdir $i >/dev/null
- printf (_ "%s: Could not create configuration
directory\n") save_function
+ printf (_ "%s: Could not create configuration
directory\n") funcsave
return 1
end
end
@@ -32,7 +34,7 @@ function funcsave --description "Save the current definition
of all specified fu
functions $i > $configdir/fish/functions/$i.fish
functions -e $i
else
- printf (_ "%s: Unknown function '%s'\n") save_function
$i
+ printf (_ "%s: Unknown function '%s'\n") funcsave $i
set res 1
end
end
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users