summaryrefslogtreecommitdiff
path: root/v-editor.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-07 02:47:02 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-07 02:47:02 -0500
commitd252b0a3eecfdf99c672ebc4cdd552087983f485 (patch)
tree4b8effd83b748bacd508e798578517f4ef565513 /v-editor.sh
parent4c96b02ae96318b1a83abffc20251abbdcb7d8ed (diff)
Minor touch-ups
Diffstat (limited to 'v-editor.sh')
-rw-r--r--v-editor.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/v-editor.sh b/v-editor.sh
index 09bccf5..e6df2b3 100644
--- a/v-editor.sh
+++ b/v-editor.sh
@@ -3,11 +3,11 @@
run() {
local editor=$1; shift
local cmd
- IFS='|' cmd=($(eval printf '%s\|' "$editor"))
+ eval "cmd=($(printf '%q ' "$editor"))"
cmd+=("$@")
"${cmd[@]}"
}
(if [ -n "$DISPLAY" ]; then run "${VISUAL:-$SELECTED_EDITOR}" "$@"
else run "${EDITOR:-$SELECTED_EDITOR}" "$@"
-fi) || run "${ALTERNATE_EDITOR:-false}" "$@"
+ fi) || run "${ALTERNATE_EDITOR:-false}" "$@"