From e0e443e5c5bbd7663542788401d0e44da91e301e Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 21 Aug 2010 12:02:11 -0400 Subject: Use -z and -n tests rather than "x$foo" = "x" hack --- examples/data/scripts/load_url_from_history.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/data/scripts/load_url_from_history.sh') 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) -- cgit v1.2.3