aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/load_url_from_history.sh
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-11-24 14:04:04 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-11-24 14:04:04 -0700
commitc7a70bb3132f970836dee9066f623ca43de35d4d (patch)
tree6060a8b4d3baf32c04a7466f0bd22a8d97de536f /examples/data/scripts/load_url_from_history.sh
parent962f224593271de64cc5b2633e202566200385bd (diff)
parent344bc3f53ade206bafb8466645c8ed57e49f1b62 (diff)
Merge branch 'dev/cleanup-scripts'
Conflicts: examples/data/scripts/insert_bookmark.sh examples/data/scripts/load_url_from_bookmarks.sh examples/data/scripts/load_url_from_history.sh examples/data/scripts/session.sh
Diffstat (limited to 'examples/data/scripts/load_url_from_history.sh')
-rwxr-xr-xexamples/data/scripts/load_url_from_history.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/data/scripts/load_url_from_history.sh b/examples/data/scripts/load_url_from_history.sh
index 1f540c9..4499e7f 100755
--- a/examples/data/scripts/load_url_from_history.sh
+++ b/examples/data/scripts/load_url_from_history.sh
@@ -3,23 +3,22 @@
DMENU_SCHEME="history"
DMENU_OPTIONS="xmms vertical resize"
-. $UZBL_UTIL_DIR/dmenu.sh
-. $UZBL_UTIL_DIR/uzbl-args.sh
-. $UZBL_UTIL_DIR/uzbl-dir.sh
+. "$UZBL_UTIL_DIR"/dmenu.sh
+. "$UZBL_UTIL_DIR"/uzbl-args.sh
+. "$UZBL_UTIL_DIR"/uzbl-dir.sh
[ -r "$UZBL_HISTORY_FILE" ] || exit 1
# choose from all entries, sorted and uniqued
# goto=$(awk '{print $3}' $history_file | sort -u | dmenu -i)
if [ -z "$DMENU_HAS_VERTICAL" ]; then
- current=$(tail -n 1 $UZBL_HISTORY_FILE | awk '{print $3}');
- goto=$((echo $current; awk '{print $3}' $UZBL_HISTORY_FILE | grep -v "^$current\$" \
- | sort -u) | $DMENU)
+ current=$(tail -n 1 "$UZBL_HISTORY_FILE" | awk '{print $3}');
+ goto=$((echo $current; awk '{print $3}' "$UZBL_HISTORY_FILE" | grep -v "^$current\$" | sort -u) | $DMENU)
else
# choose an item in reverse order, showing also the date and page titles
# pick the last field from the first 3 fields. this way you can pick a url (prefixed with date & time) or type just a new url.
- goto=$(tac $UZBL_HISTORY_FILE | $DMENU | cut -d ' ' -f -3 | awk '{print $NF}')
+ goto=$(tac "$UZBL_HISTORY_FILE" | $DMENU | cut -d ' ' -f -3 | awk '{print $NF}')
fi
-#[ -n "$goto" ] && echo "uri $goto" > $UZBL_FIFO
-[ -n "$goto" ] && echo "uri $goto" | socat - unix-connect:$UZBL_SOCKET
+[ -n "$goto" ] && echo "uri $goto" > "$UZBL_FIFO"
+#[ -n "$goto" ] && echo "uri $goto" | socat - unix-connect:"$UZBL_SOCKET"