summaryrefslogtreecommitdiff
path: root/themes/avit.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-04-25 15:36:48 -0600
committerTuowen Zhao <ztuowen@gmail.com>2018-04-25 15:36:48 -0600
commit1481f7aa67df42bdf45953231637194ac200d240 (patch)
tree7d41eb6b369e3ab0f25753623c966b69340e54cf /themes/avit.zsh-theme
parentb7b623d6de696b81d213ec666d072851561d5c06 (diff)
parent9cd3701ac0297f4bdf9673ea0dffa8ffdaea63e8 (diff)
downloadzsh-1481f7aa67df42bdf45953231637194ac200d240.tar.gz
zsh-1481f7aa67df42bdf45953231637194ac200d240.tar.bz2
zsh-1481f7aa67df42bdf45953231637194ac200d240.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'themes/avit.zsh-theme')
-rw-r--r--themes/avit.zsh-theme4
1 files changed, 1 insertions, 3 deletions
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
index 4f0dcbcc6..c43fcc9fe 100644
--- a/themes/avit.zsh-theme
+++ b/themes/avit.zsh-theme
@@ -50,9 +50,7 @@ function _ruby_version() {
# use a neutral color, otherwise colors will vary according to time.
function _git_time_since_commit() {
# Only proceed if there is actually a commit.
- if git log -1 > /dev/null 2>&1; then
- # Get the last commit.
- last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
+ if last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null); then
now=$(date +%s)
seconds_since_last_commit=$((now-last_commit))