From 0809e47599aeb86b851a3338b71602f69306dfed Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 13 Apr 2011 22:16:34 -0400 Subject: Handle returned uris in the follow.sh wrapper --- examples/data/scripts/follow.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/data/scripts/follow.sh b/examples/data/scripts/follow.sh index 014793e..01a4f91 100755 --- a/examples/data/scripts/follow.sh +++ b/examples/data/scripts/follow.sh @@ -1,7 +1,13 @@ #!/bin/sh # This scripts acts on the return value of followLinks in follow.js -case "$1" in +result=$1 +shift + +uriaction=$1 +shift + +case "$result" in XXXEMIT_FORM_ACTIVEXXX) # a form element was selected printf 'event FORM_ACTIVE\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" @@ -10,4 +16,12 @@ case "$1" in # a link was selected, reset uzbl's input mode printf 'set mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" ;; + XXXRETURNED_URIXXX*) + uri=${result#XXXRETURNED_URIXXX} + + case "$uriaction" in + set) + printf 'uri '"$uri"'\nset mode=\nevent KEYCMD_CLEAR\n' > "$UZBL_FIFO" + ;; + esac esac -- cgit v1.2.3