aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/load_url_from_history.sh
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <MathStuf@gmail.com>2010-08-21 12:02:11 -0400
committerGravatar Ben Boeckel <MathStuf@gmail.com>2010-10-02 11:56:29 -0400
commite0e443e5c5bbd7663542788401d0e44da91e301e (patch)
treee74e930ddac1eece035d9a9d2aa08d9fe28c9b97 /examples/data/scripts/load_url_from_history.sh
parenta2901d469cacd317e8995486401f363bc569d37c (diff)
Use -z and -n tests rather than "x$foo" = "x" hack
Diffstat (limited to 'examples/data/scripts/load_url_from_history.sh')
-rwxr-xr-xexamples/data/scripts/load_url_from_history.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/data/scripts/load_url_from_history.sh b/examples/data/scripts/load_url_from_history.sh
index f79e018..ca8959c 100755
--- a/examples/data/scripts/load_url_from_history.sh
+++ b/examples/data/scripts/load_url_from_history.sh
@@ -8,7 +8,7 @@ source $UZBL_UTIL_DIR/uzbl-dir.sh
# choose from all entries, sorted and uniqued
# goto=$(awk '{print $3}' $history_file | sort -u | dmenu -i)
-if [ "x$DMENU_HAS_VERTICAL" = "x" ]; then
+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)