mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user