diff options
author | maxfl <gmaxfl@gmail.com> | 2012-06-30 10:35:31 +0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-01 14:20:43 -0700 |
commit | fe2628437693733e60772aed25be323ec4b615ae (patch) | |
tree | edecb2d611c521a356793767e70df063d1a821e5 /share | |
parent | ab62fe6496eaf7a56cf30f682dc30c13002ec8aa (diff) |
Doc is updated
btw. funced completion is updated
Diffstat (limited to 'share')
-rw-r--r-- | share/functions/funced.fish | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/share/functions/funced.fish b/share/functions/funced.fish index ad56dab0..cc9db224 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -47,7 +47,11 @@ function funced --description 'Edit function definition' set init function $funcname\n\nend end - if begin; test "$editor" = fish; or set -q interactive[1]; end + if not type -f "$editor" >/dev/null + set interactive 1 + end + + if begin; set -q interactive[1]; or test "$editor" = fish; end set -l IFS if functions -q -- $funcname # Shadow IFS here to avoid array splitting in command substitution @@ -65,12 +69,6 @@ function funced --description 'Edit function definition' return 0 end - if not type -f "$editor" >/dev/null - set_color red - printf (_ "%s: Editor %s is not found\n") funced $editor - set_color normal - end - set -q TMPDIR; or set -l TMPDIR /tmp set -l tmpname (printf "$TMPDIR/fish_funced_%d_%d.fish" %self (random)) while test -f $tmpname |