diff options
Diffstat (limited to 'v-editor.sh')
-rw-r--r-- | v-editor.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/v-editor.sh b/v-editor.sh index 2d0f52f..7a4e050 100644 --- a/v-editor.sh +++ b/v-editor.sh @@ -6,9 +6,9 @@ run() { if [[ $# -gt 0 ]]; then printf -v args -- ' %q' "$@" fi - eval "${prog}${args}" + eval exec -- "${prog}${args}" } -(if [ -n "$DISPLAY" ]; then run "${VISUAL:-$SELECTED_EDITOR}" "$@" - else run "${EDITOR:-$SELECTED_EDITOR}" "$@" - fi) || run "${ALTERNATE_EDITOR:-false}" "$@" +{ if [ -n "$DISPLAY" ]; then run "${VISUAL:-$SELECTED_EDITOR}" "$@" + else run "${EDITOR:-$SELECTED_EDITOR}" "$@" + fi } || run "${ALTERNATE_EDITOR:-false}" "$@" |