diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-04-13 22:16:34 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-04-13 22:16:34 -0400 |
commit | 0809e47599aeb86b851a3338b71602f69306dfed (patch) | |
tree | 0b63f7d9a056344b370d4412e34a4f848342c6db /examples/data | |
parent | c7cf3ef494c7e971c7884bb8e5ba93c9c5e9b32d (diff) |
Handle returned uris in the follow.sh wrapper
Diffstat (limited to 'examples/data')
-rwxr-xr-x | examples/data/scripts/follow.sh | 16 |
1 files changed, 15 insertions, 1 deletions
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 |