clean up argument passing
This commit is contained in:
parent
bc14e722ec
commit
b0ab785ccd
|
@ -1,19 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
test $# -gt 0 &&
|
|
||||||
cmd="$1" &&
|
|
||||||
shift
|
|
||||||
|
|
||||||
# {%@@ if terminal == "alacritty" @@%} #
|
# {%@@ if terminal == "alacritty" @@%} #
|
||||||
command -v alacritty > /dev/null &&
|
command -v alacritty > /dev/null &&
|
||||||
{
|
{
|
||||||
test "$#" -gt "0" &&
|
test $# -gt 0 &&
|
||||||
exec alacritty -e "$cmd $@" ||
|
exec alacritty -e $@ ||
|
||||||
exec alacritty
|
exec alacritty
|
||||||
} & exit
|
} & exit
|
||||||
# {%@@ else @@%} #
|
# {%@@ else @@%} #
|
||||||
command -v kitty > /dev/null &&
|
command -v kitty > /dev/null &&
|
||||||
exec kitty $cmd $@
|
exec kitty -- $@ & exit
|
||||||
# {%@@ endif @@%} #
|
# {%@@ endif @@%} #
|
||||||
|
|
||||||
notify-send "Error" "Terminal program missing"
|
notify-send "Error" "Terminal program missing"
|
||||||
|
|
Reference in New Issue