setup cdr

This commit is contained in:
Timothy DeHerrera 2019-12-16 15:36:20 -07:00
parent 831f9b1b5c
commit 0fff9dbd8d
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,11 @@
if [[ -z "$ZSH_CDR_DIR" ]]; then
ZSH_CDR_DIR=${XDG_CACHE_HOME:-$HOME/.cache}/zsh-cdr
fi
mkdir -p $ZSH_CDR_DIR
autoload -Uz chpwd_recent_dirs cdr
autoload -U add-zsh-hook
add-zsh-hook chpwd chpwd_recent_dirs
zstyle ':chpwd:*' recent-dirs-file $ZSH_CDR_DIR/recent-dirs
zstyle ':chpwd:*' recent-dirs-max 1000
# fall through to cd
zstyle ':chpwd:*' recent-dirs-default yes

View file

@ -74,6 +74,7 @@ in
zshrc = fileContents ./zshrc;
sources = with pkgs; [
./cdr.zsh
"${skim}/share/skim/completion.zsh"
"${oh-my-zsh}/share/oh-my-zsh/plugins/sudo/sudo.plugin.zsh"
"${oh-my-zsh}/share/oh-my-zsh/plugins/extract/extract.plugin.zsh"