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