diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2015-09-02 13:55:59 +0200 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2015-09-02 13:55:59 +0200 |
commit | f3695b95fc95fa53dee2a7ce41a171215ea75d5b (patch) | |
tree | 85f422a7c3ac910f7488d6ae4d59c216b980d7a9 /share/functions/funced.fish | |
parent | 32a3e15309a0f4296db49261163c575a6468b2c8 (diff) |
Use $VISUAL before $EDITOR in funced
Closes #2268
Diffstat (limited to 'share/functions/funced.fish')
-rw-r--r-- | share/functions/funced.fish | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/functions/funced.fish b/share/functions/funced.fish index e9248f87..6439e53f 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -1,5 +1,11 @@ function funced --description 'Edit function definition' - set -l editor $EDITOR + set -l editor + # Check VISUAL first since theoretically EDITOR could be ed + if set -q VISUAL + set editor $VISUAL + else if set -q EDITOR + set editor $EDITOR + end set -l interactive set -l funcname while set -q argv[1] |