diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-11 14:52:11 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-11 14:52:11 +1300 |
commit | 6e8c6c521ae5d60427634be01b82fe61a79f192b (patch) | |
tree | 5349fc3e9838c69dbb6fd69f0234ea921ea446ea /sh/profile.d/downloads.sh | |
parent | Factor out zsh ENV hack into one file (diff) | |
download | dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.tar.gz dotfiles-6e8c6c521ae5d60427634be01b82fe61a79f192b.zip |
Refactor some conditionals
Diffstat (limited to 'sh/profile.d/downloads.sh')
-rw-r--r-- | sh/profile.d/downloads.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sh/profile.d/downloads.sh b/sh/profile.d/downloads.sh index 865cb859..1a89bc3f 100644 --- a/sh/profile.d/downloads.sh +++ b/sh/profile.d/downloads.sh @@ -8,7 +8,7 @@ esac [ -z "$TMUX" ] || return # Not if ~/.hushlogin exists -[ -e "$HOME"/.hushlogin ] && return +! [ -e "$HOME"/.hushlogin ] || return # Not if ~/.downloads doesn't [ -f "$HOME"/.downloads ] || return @@ -27,5 +27,7 @@ esac printf 'You have %u unsorted files in %s.\n' "$#" "$dir" lc=$((lc+1)) done < "$HOME"/.downloads - [ "$((lc > 0))" -eq 1 ] && printf '\n' + if [ "$lc" -gt 0 ] ; then + printf '\n' + fi ) |