fix stat
This commit is contained in:
6
.zshrc
6
.zshrc
@@ -1,4 +1,5 @@
|
||||
# Basic
|
||||
mkdir -p ~/.vim/{undo,swap,backup} 2>/dev/null
|
||||
export LANG=en_US.UTF-8
|
||||
export EDITOR=vim
|
||||
export HISTFILE=~/.zhistory
|
||||
@@ -31,6 +32,7 @@ unsetopt BANG_HIST # no ! history expansion
|
||||
# modules
|
||||
zmodload zsh/datetime
|
||||
zmodload zsh/mathfunc
|
||||
zmodload zsh/stat
|
||||
|
||||
# plugin manager
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}}/.zinit.git"
|
||||
@@ -92,7 +94,7 @@ zinit light starship/starship
|
||||
{
|
||||
sleep 1
|
||||
local marker=~/.cache/.dotfiles-pull
|
||||
[[ -f $marker && $(($(date +%s) - $(stat -c %Y $marker))) -lt 86400 ]] && return
|
||||
[[ -f $marker && $((EPOCHSECONDS - $(zstat +mtime $marker))) -lt 86400 ]] && return
|
||||
mkdir -p ~/.cache && touch $marker
|
||||
git --git-dir=$HOME/.dotgit/ --work-tree=$HOME pull --ff-only -q 2>/dev/null
|
||||
} &!
|
||||
@@ -102,6 +104,8 @@ typeset -U path
|
||||
path=(
|
||||
$HOME/.local/bin
|
||||
$HOME/.cargo/bin
|
||||
/usr/local/go/bin
|
||||
$HOME/go/bin
|
||||
$path
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user