aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-05-17 09:35:15 +0200
committerGravatar Dieter Plaetinck <dieter@plaetinck.be>2009-05-17 09:35:15 +0200
commit6396f7bb44754be1ca9570a641aa1b7f9808dce4 (patch)
treedc133e4373ba3d3cf6e1bbf13827d0c7ff68186e
parent8d0abbb767e5023f5824dacf18c527d156b6cdac (diff)
fix for pick right field in load_from_history
-rwxr-xr-xexamples/scripts/load_url_from_history.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/scripts/load_url_from_history.sh b/examples/scripts/load_url_from_history.sh
index cf2ceb2..ec54631 100755
--- a/examples/scripts/load_url_from_history.sh
+++ b/examples/scripts/load_url_from_history.sh
@@ -10,7 +10,8 @@ if dmenu --help 2>&1 | grep -q '\[-rs\] \[-ni\] \[-nl\] \[-xs\]'
then
DMENU="dmenu -i -xs -rs -l 10" # vertical patch
# choose an item in reverse order, showing also the date and page titles
- goto=`tac $history_file | $DMENU | awk '{print $3}'`
+ # 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 $history_file | $DMENU | cut -d ' ' -f -3 | awk '{print $NF}'`
else
DMENU="dmenu -i"
# choose from all entries (no date or title), the first one being current url, and after that all others, sorted and uniqued, in ascending order