aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-04 12:55:18 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-04 12:55:18 +1200
commitf06a44231a91ba3561c9492c1e31b1c30c165130 (patch)
treefd1f2f72a65ae56c5dc0c4a07319c292d8433a5c /bash/bashrc.d/prompt.bash
parentCorrect argument test in bd() and prompt() (diff)
downloaddotfiles-f06a44231a91ba3561c9492c1e31b1c30c165130.tar.gz
dotfiles-f06a44231a91ba3561c9492c1e31b1c30c165130.zip
Use consistent [[ syntax
Explicit -n, ! within [[
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash4
1 files changed, 2 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index 9ade2c80..27cb9dd5 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -86,7 +86,7 @@ prompt() {
git symbolic-ref --quiet HEAD \
|| git rev-parse --short HEAD
} 2>/dev/null )
- if [[ ! $branch ]] ; then
+ if [[ ! -n $branch ]] ; then
return 1
fi
branch=${branch##*/}
@@ -190,7 +190,7 @@ prompt() {
done < <(svn info 2>/dev/null)
# Exit if we couldn't get either
- if ! [[ $url && $root ]] ; then
+ if [[ ! -n $url || ! -n $root ]] ; then
return 1
fi