Zsh: move tmux lauch to it's own configuration file and make it the
first one executed
This commit is contained in:
parent
c134cdce6c
commit
1ae2219d8a
8 changed files with 13 additions and 14 deletions
17
home/.config/zsh/08-pacman.zsh
Normal file
17
home/.config/zsh/08-pacman.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
# from https://wiki.archlinux.org/index.php/Zsh#On-demand_rehash
|
||||
|
||||
zshcache_time="$(date +%s%N)"
|
||||
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
rehash_precmd() {
|
||||
if [[ -e /var/cache/zsh/pacman ]]; then
|
||||
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
|
||||
if ((zshcache_time < paccache_time)); then
|
||||
rehash
|
||||
zshcache_time="$paccache_time"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
add-zsh-hook -Uz precmd rehash_precmd
|
Loading…
Add table
Add a link
Reference in a new issue