Update funced

* Editor mode is no the default
* Use -i or --interactive or -e fish to edit function in interactive
  mode
* tmpname is now created with random number added and check that file
  do not already exist
* check $TMPDIR existence and put /tmp if it does not exist
* There is an undocumented feature to use functions, started with dash.
  Introduce necessary changes to funced, functions, def_function()
  in order to make it work properly.
* Delete editor guessing. Use $EDITOR variable or -e key
This commit is contained in:
maxfl
2012-06-30 10:22:41 +08:00
committed by ridiculousfish
parent bc9bae0f7f
commit ab62fe6496
4 changed files with 93 additions and 80 deletions

View File

@@ -30,9 +30,9 @@ function funcsave --description "Save the current definition of all specified fu
end
for i in $argv
if functions -q $i
functions $i > $configdir/fish/functions/$i.fish
functions -e $i
if functions -q -- $i
functions -- $i > $configdir/fish/functions/$i.fish
functions -e -- $i
else
printf (_ "%s: Unknown function '%s'\n") funcsave $i
set res 1