summaryrefslogtreecommitdiffstats
path: root/.zsh
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2019-03-02 14:57:19 +0100
committerTharre <tharre3@gmail.com>2019-03-02 14:57:19 +0100
commitd4cdb8c3cd0ca0c179a5646bed1a3ee85bbd47b9 (patch)
treeee5a011978f3209e0506feae003dd9212f40c192 /.zsh
parent2e51e50fa0993074601e07178cd34ad6f8050896 (diff)
downloaddotfiles-d4cdb8c3cd0ca0c179a5646bed1a3ee85bbd47b9.tar.gz
dotfiles-d4cdb8c3cd0ca0c179a5646bed1a3ee85bbd47b9.tar.xz
dotfiles-d4cdb8c3cd0ca0c179a5646bed1a3ee85bbd47b9.zip
zsh: ignore git error in prompt function
Avoids errors like this one after every command: warning: could not open directory 'pkg/': Permission denied
Diffstat (limited to '.zsh')
-rw-r--r--.zsh/prompt_custom_setup2
1 files changed, 1 insertions, 1 deletions
diff --git a/.zsh/prompt_custom_setup b/.zsh/prompt_custom_setup
index 1fd02c4..262777a 100644
--- a/.zsh/prompt_custom_setup
+++ b/.zsh/prompt_custom_setup
@@ -11,7 +11,7 @@ function prompt_print_hostname() {
function git_prompt_parse_dirty() {
local FLAGS=("--porcelain" "--ignore-submodules=dirty")
- local STATUS=$(command git status $FLAGS | tail -n1)
+ local STATUS=$(command git status $FLAGS 2> /dev/null | tail -n1)
if [[ -n $STATUS ]]; then
printf "%s" "%F{214}*%f"
fi