aboutsummaryrefslogtreecommitdiff
path: root/zsh/zshrc.d/prompt.zsh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-03-29 17:17:40 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-03-29 17:17:40 +1300
commit607527f2d20e40dea83a1fc6ead4ad37467c0f4c (patch)
tree443542331aa694ebd4bdbdfb80c96d3b8260a2da /zsh/zshrc.d/prompt.zsh
parentRemove unneeded leading pipe from b:undo_ftplugin (diff)
downloaddotfiles-607527f2d20e40dea83a1fc6ead4ad37467c0f4c.tar.gz
dotfiles-607527f2d20e40dea83a1fc6ead4ad37467c0f4c.zip
Fix up a few cosmetic shell anti-patterns
Diffstat (limited to 'zsh/zshrc.d/prompt.zsh')
-rw-r--r--zsh/zshrc.d/prompt.zsh7
1 files changed, 4 insertions, 3 deletions
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh
index 689866e3..980d8669 100644
--- a/zsh/zshrc.d/prompt.zsh
+++ b/zsh/zshrc.d/prompt.zsh
@@ -10,7 +10,7 @@ prompt() {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
- if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
+ if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
PS1=$PS1'%m:'
fi
PS1=$PS1'%~'
@@ -121,8 +121,9 @@ prompt() {
fi
# There are some untracked and unignored files
- if git ls-files --directory --error-unmatch --exclude-standard \
- --no-empty-directory --others -- ':/*' ; then
+ if git ls-files --directory --error-unmatch \
+ --exclude-standard --no-empty-directory \
+ --others -- ':/*' ; then
state=${state}'?'
fi