summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-04 18:55:32 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2016-11-05 10:25:09 +0100
commit86bd28fcb4d760cc16b616acc7d1065d7153c852 (patch)
tree2577cbfe534f36ae7d5094153ffd9183b968d7aa
parent093137cdbafc106bedd53189d37265d5d3f5d669 (diff)
downloaddotfiles-86bd28fcb4d760cc16b616acc7d1065d7153c852.tar.xz
Simplify check for empty variable
Someday this is going to bite me in the ass. Right now though, I can't come up with a reason not to do this. Inspiration: test(1) -n STRING the length of STRING is nonzero STRING equivalent to -n STRING
-rw-r--r--.bashprompt2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bashprompt b/.bashprompt
index 0ce903f..873746c 100644
--- a/.bashprompt
+++ b/.bashprompt
@@ -3,7 +3,7 @@ __set-title ()
local title
local path=$(git root 2> /dev/null)
- if [ -n "${path}" ]
+ if [ ${path} ]
then
title=$(basename ${path})
else