dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 86bd28fcb4d760cc16b616acc7d1065d7153c852
parent 093137cdbafc106bedd53189d37265d5d3f5d669
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Fri,  4 Nov 2016 18:55:32 +0100

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

Diffstat:
M.bashprompt | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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