aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/follow.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 19:59:55 -0500
committerGravatar Ben Boeckel <MathStuf@gmail.com>2011-03-10 22:32:23 -0500
commitdb5213a116da236ff829ee4fa9a14c20867a852b (patch)
tree9b03c4a6c5d91b94ad244b0d385e74c93a954487 /examples/data/scripts/follow.sh
parent06c29bbd5d1ad0542d8de4a6661bd8366d9c56d5 (diff)
Remove the use of positional arguments
Positional arguments should be given meaningful names.
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rwxr-xr-xexamples/data/scripts/follow.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh
index 3d0e992..83db395 100755
--- a/examples/data/scripts/follow.sh
+++ b/examples/data/scripts/follow.sh
@@ -3,14 +3,17 @@
# This script is just a wrapper around follow.js that lets us change uzbl's mode
# after a link is selected.
+keys="$1"
+shift
+
# if socat is installed then we can change Uzbl's input mode once a link is
# selected; otherwise we just select a link.
if ! which socat >/dev/null 2>&1; then
- echo "script @scripts_dir/follow.js \"@{follow_hint_keys} $1\"" > "$UZBL_FIFO"
+ echo "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"" > "$UZBL_FIFO"
exit
fi
-result="$(echo "script @scripts_dir/follow.js \"@{follow_hint_keys} $1\"" | socat - "unix-connect:$UZBL_SOCKET")"
+result="$(echo "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"" | socat - "unix-connect:$UZBL_SOCKET")"
case $result in
*XXXEMIT_FORM_ACTIVEXXX*)
# a form element was selected