Use "$@" for expansion calls rather than manually listing argument numbers

This commit is contained in:
Miles Alan 2020-06-27 20:19:47 -05:00
parent d4a6bacec0
commit cef4de2af0
7 changed files with 8 additions and 8 deletions

View file

@ -98,5 +98,5 @@ recordmenu() {
if [ -z "$1" ]; then
recordmenu
else
"$1" "$2" "$3"
"$@"
fi

View file

@ -26,4 +26,4 @@ down() {
setdelta "-${STEP}"
}
"$1" "$2"
"$@"

View file

@ -84,7 +84,7 @@ gpslatlonget() {
echo "$LAT" "$LON" "$ZOOM"
}
gpslatlonset() {
CORDS="$(echo $@ | tr -d ',°')"
CORDS="$(echo "$@" | tr -d ',°')"
LAT="$(echo "$CORDS" | cut -d' ' -f1)"
LON="$(echo "$CORDS" | cut -d' ' -f2)"
ZOOM="$(echo "$CORDS" | cut -d' ' -f3)"
@ -226,4 +226,4 @@ menumaptype() {
done
}
"$1" "$2" "$3" "$4" "$5"
"$@"

View file

@ -4,5 +4,5 @@ WMCLASS="$(xprop -id "$ACTIVEWIN" | grep WM_CLASS | cut -d ' ' -f3-)"
# E.g. just a check to ignore 1-finger gestures in foxtrotgps
if echo "$WMCLASS" | grep -vi foxtrot; then
$@
"$@"
fi

View file

@ -1,7 +1,7 @@
#!/usr/bin/env sh
pkill -9 lisgd
lisgd $@ \
lisgd "$@" \
-g '1,LR,sxmo_lisgdonefingercheck.sh xdotool key --clearmodifiers Alt+Shift+e' \
-g '1,RL,sxmo_lisgdonefingercheck.sh xdotool key --clearmodifiers Alt+Shift+r' \
-g '1,DLUR,sxmo_lisgdonefingercheck.sh sxmo_vol.sh up' \

View file

@ -19,7 +19,7 @@ menu() {
}
if [ $# -gt 0 ]; then
"$1" "$2"
"$@"
else
menu
fi

View file

@ -217,4 +217,4 @@ pickup() {
}
modem_n || fatalerr "Couldn't determine modem number - is modem online?"
"$1" "$2"
"$@"