clean up argument passing

This commit is contained in:
lelgenio 2020-12-11 14:16:44 -03:00
parent bc14e722ec
commit b0ab785ccd
1 changed files with 3 additions and 7 deletions

View File

@ -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"