diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-01 01:45:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-09-01 01:45:59 +1200 |
commit | 4629275966f91e9ae7bae4ed41866bd62eec40b1 (patch) | |
tree | bd907a8ed4345c582d927642f427484e2ed2c159 /bash | |
parent | Forgot a couple of array declarations (diff) | |
download | dotfiles-4629275966f91e9ae7bae4ed41866bd62eec40b1.tar.gz dotfiles-4629275966f91e9ae7bae4ed41866bd62eec40b1.zip |
Don't need -n inside [[
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index aee3df66..0107c458 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -84,7 +84,7 @@ prompt() { # If there are any new unignored files in the working tree, add a # question mark to the state - if [[ -n $(git ls-files --others --exclude-standard) ]]; then + if [[ $(git ls-files --others --exclude-standard) ]]; then state[${#state[@]}]='?' fi @@ -106,7 +106,7 @@ prompt() { # If there are changes in the tree, add an exclamation mark to the # state - if [[ -n $(hg status 2>/dev/null) ]]; then + if [[ $(hg status 2>/dev/null) ]]; then state[${#state[@]}]='!' fi @@ -141,7 +141,7 @@ prompt() { # If there are changes in the working directory, add an exclamation # mark to the state - if [[ -n $(svn status 2>/dev/null) ]]; then + if [[ $(svn status 2>/dev/null) ]]; then state[${#state[@]}]='!' fi @@ -164,7 +164,7 @@ prompt() { # Show the count of background jobs in curly brackets job) - if [[ -n $(jobs) ]]; then + if [[ $(jobs) ]]; then printf '{%d}' "$(jobs | sed -n '$=')" fi ;; |