diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 22:23:36 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-03-10 22:32:50 -0500 |
commit | dcf3ffda8005c73c15f5142c61ee492f14af590a (patch) | |
tree | b73cb35a08af35c81f0bf3e605a25bf378016f85 /examples/data/scripts/follow.sh | |
parent | f43741a91218936749afb3242a6e473f76387684 (diff) |
Use print rather than printf
printf chokes on $(printf "%DD") which may very well come up in an
encoded URL. Avoid that with the print alias.
Diffstat (limited to 'examples/data/scripts/follow.sh')
-rwxr-xr-x | examples/data/scripts/follow.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index b038c12..ac5c6cb 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -3,24 +3,26 @@ # This script is just a wrapper around follow.js that lets us change uzbl's mode # after a link is selected. +. "$UZBL_UTIL_DIR/uzbl-util.sh" + 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 - printf "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" > "$UZBL_FIFO" + print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" > "$UZBL_FIFO" exit fi -result="$( printf "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )" +result="$( print "script @scripts_dir/follow.js \"@{follow_hint_keys} $keys\"\n" | socat - "unix-connect:$UZBL_SOCKET" )" case $result in *XXXEMIT_FORM_ACTIVEXXX*) # a form element was selected - printf "event FORM_ACTIVE\n" > "$UZBL_FIFO" + print "event FORM_ACTIVE\n" > "$UZBL_FIFO" ;; *XXXRESET_MODEXXX*) # a link was selected, reset uzbl's input mode - printf "set mode=\n" > "$UZBL_FIFO" + print "set mode=\n" > "$UZBL_FIFO" ;; esac |