Quote the variables in i3-sensible-* correctly
Previously, the variables $EDITOR, $PAGER, $TERMINAL and $VISUAL got shell-expanded twice before executing them.
This commit is contained in:
parent
a2b20c8d9a
commit
a5b2c91c93
@ -9,8 +9,8 @@
|
|||||||
# mechanism to find the preferred editor
|
# mechanism to find the preferred editor
|
||||||
|
|
||||||
# Hopefully one of these is installed (no flamewars about preference please!):
|
# Hopefully one of these is installed (no flamewars about preference please!):
|
||||||
for editor in $VISUAL $EDITOR nano vim vi emacs pico qe mg jed gedit mc-edit; do
|
for editor in "$VISUAL" "$EDITOR" nano vim vi emacs pico qe mg jed gedit mc-edit; do
|
||||||
if command -v $editor > /dev/null 2>&1; then
|
if command -v "$editor" > /dev/null 2>&1; then
|
||||||
exec $editor "$@"
|
exec "$editor" "$@"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
# Hopefully one of these is installed (no flamewars about preference please!):
|
# Hopefully one of these is installed (no flamewars about preference please!):
|
||||||
# We don't use 'more' because it will exit if the file is too short.
|
# We don't use 'more' because it will exit if the file is too short.
|
||||||
# Worst case scenario we'll open the file in your editor.
|
# Worst case scenario we'll open the file in your editor.
|
||||||
for pager in $PAGER less most w3m pg i3-sensible-editor; do
|
for pager in "$PAGER" less most w3m pg i3-sensible-editor; do
|
||||||
if command -v $pager > /dev/null 2>&1; then
|
if command -v "$pager" > /dev/null 2>&1; then
|
||||||
exec $pager "$@"
|
exec "$pager" "$@"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
# We welcome patches that add distribution-specific mechanisms to find the
|
# We welcome patches that add distribution-specific mechanisms to find the
|
||||||
# preferred terminal emulator. On Debian, there is the x-terminal-emulator
|
# preferred terminal emulator. On Debian, there is the x-terminal-emulator
|
||||||
# symlink for example.
|
# symlink for example.
|
||||||
for terminal in $TERMINAL x-terminal-emulator urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm xfce4-terminal termite lxterminal mate-terminal terminology; do
|
for terminal in "$TERMINAL" x-terminal-emulator urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm xfce4-terminal termite lxterminal mate-terminal terminology; do
|
||||||
if command -v $terminal > /dev/null 2>&1; then
|
if command -v "$terminal" > /dev/null 2>&1; then
|
||||||
exec $terminal "$@"
|
exec "$terminal" "$@"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user