aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/scripts/util
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/util
parenta2901d469cacd317e8995486401f363bc569d37c (diff)
Use -z and -n tests rather than "x$foo" = "x" hack
Diffstat (limited to 'examples/data/scripts/util')
-rw-r--r--examples/data/scripts/util/dmenu.sh6
-rw-r--r--examples/data/scripts/util/editor.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/data/scripts/util/dmenu.sh b/examples/data/scripts/util/dmenu.sh
index 3f307f2..2326cea 100644
--- a/examples/data/scripts/util/dmenu.sh
+++ b/examples/data/scripts/util/dmenu.sh
@@ -40,12 +40,12 @@ case "$DMENU_SCHEME" in
esac
# Default arguments
-if [ "x$DMENU_ARGS" = "x" ]; then
+if [ -z "$DMENU_ARGS" ]; then
DMENU_ARGS="-i"
fi
# Set the prompt if wanted
-if [ ! "x$DMENU_PROMPT" = "x" ]; then
+if [ -n "$DMENU_PROMPT" ]; then
DMENU_ARGS="$DMENU_ARGS -p $DMENU_PROMPT"
fi
@@ -58,7 +58,7 @@ fi
# Detect the vertical patch
if dmenu --help 2>&1 | grep -q '\[-l lines\]'; then
# Default to 10 lines
- if [ "x$DMENU_LINES" = "x" ]; then
+ if [ -z "$DMENU_LINES" ]; then
DMENU_LINES=10
fi
diff --git a/examples/data/scripts/util/editor.sh b/examples/data/scripts/util/editor.sh
index a152ebd..1969769 100644
--- a/examples/data/scripts/util/editor.sh
+++ b/examples/data/scripts/util/editor.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Editor selection
-if [ "x$VTERM" = "x" ]; then
+if [ -z "$VTERM" ]; then
VTERM="xterm"
fi