]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Add newline between prompts if in git repo
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 16 Jul 2019 13:27:33 +0000 (14:27 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 16 Jul 2019 13:27:33 +0000 (14:27 +0100)
states/zsh/files/zshrc

index 6fe4aafd4d01e20eef19068a05b8cbbaee1b0cec..365ca41e9a7b52bfbb650d4aa6e14bd29a49e84b 100644 (file)
@@ -46,8 +46,10 @@ zstyle ':vcs_info:*' enable git
 
 # or use pre_cmd, see man zshcontrib
 precmd() {
-       echo
        vcs_info
+       if [[ -n ${vcs_info_msg_0_} ]]; then
+               echo
+       fi
 }
 
 prompt='$vcs_info_msg_0_'