Обновление ohmyzsh
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Dirpersist plugin
|
||||
|
||||
This plugin keeps a running tally of the previous 20 unique directories in the $HOME/.zdirs file. When you cd to a new directory, it is prepended to the beginning of the file.
|
||||
This plugin keeps a running tally of the previous 20 unique directories in the `$HOME/.zdirs` file.
|
||||
When you cd to a new directory, it is prepended to the beginning of the file.
|
||||
|
||||
To use it, add `dirpersist` to the plugins array in your zshrc file:
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
|
||||
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
|
||||
fi
|
||||
|
||||
chpwd_functions+=(chpwd_dirpersist)
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd chpwd_dirpersist
|
||||
chpwd_dirpersist() {
|
||||
if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi
|
||||
local -ax my_stack
|
||||
|
||||
Reference in New Issue
Block a user