summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsor.alexei@meowr.ru <sor.alexei@meowr.ru>2019-03-19 15:13:38 +1030
committerSimon Lees <sflees@suse.de>2019-03-19 15:13:38 +1030
commitacdf8909f2bf65ca20e69ab1e6bc6854d54b333d (patch)
tree947811ce600d682bc6ca7068b92f405a1ce72e69
parent755e1f27c58016507053d192351666862905b3cc (diff)
Fixes -x argument, which is the default for {gnome,mate}-terminal
Signed-off-by: Simon Lees <sflees@suse.de>
-rw-r--r--scripts/xdg-terminal.in34
1 files changed, 23 insertions, 11 deletions
diff --git a/scripts/xdg-terminal.in b/scripts/xdg-terminal.in
index 221487c..36a9833 100644
--- a/scripts/xdg-terminal.in
+++ b/scripts/xdg-terminal.in
@@ -65,11 +65,17 @@ terminal_gnome()
if [ x"$1" = x"" ]; then
$terminal_exec
else
- if [ x"$term_exec_arg" = x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
+ case "$term_exec_arg" in
+ "")
+ "$terminal_exec" "$1"
+ ;;
+ *-x*)
+ "$terminal_exec" "$term_exec_arg" sh -c "$1"
+ ;;
+ *)
+ "$terminal_exec" "$term_exec_arg" "$1"
+ ;;
+ esac
fi
if [ $? -eq 0 ]; then
@@ -93,13 +99,19 @@ terminal_gsettings()
if [ -x "$terminal_exec" ]; then
if [ x"$1" = x"" ]; then
- $terminal_exec
+ "$terminal_exec"
else
- if [ x"$term_exec_arg" = x"" ]; then
- $terminal_exec "$1"
- else
- $terminal_exec "$term_exec_arg" "$1"
- fi
+ case "$term_exec_arg" in
+ "")
+ "$terminal_exec" "$1"
+ ;;
+ *-x*)
+ "$terminal_exec" "$term_exec_arg" sh -c "$1"
+ ;;
+ *)
+ "$terminal_exec" "$term_exec_arg" "$1"
+ ;;
+ esac
fi
if [ $? -eq 0 ]; then