From 60f8da8266d647ab09689ea815c5fe80b17eb76a Mon Sep 17 00:00:00 2001 From: Huan Du Date: Thu, 22 Feb 2018 15:29:14 +0800 Subject: [PATCH] use -n instead -f to test go file existence --- bullet-train.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index bd0a8c6..07239a5 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -534,7 +534,7 @@ prompt_perl() { # Go prompt_go() { setopt extended_glob - if [[ (-f *.go(#qN) || -d Godeps || -f glide.yaml) ]]; then + if [[ (-n *.go(#qN) || -d Godeps || -f glide.yaml) ]]; then if command -v go > /dev/null 2>&1; then prompt_segment $BULLETTRAIN_GO_BG $BULLETTRAIN_GO_FG $BULLETTRAIN_GO_PREFIX" $(go version | grep --colour=never -oE '[[:digit:]].[[:digit:]]')" fi