Skip to content

history files doesn't get populated with additional chpwd hook present #12

Description

@yggdr

Hi,
the history files seem to not get written to when I have the following autols function (excerpt from my zshrc). When I remove the autols function, it might start working, but not necessarily immediately?! I'm a bit confused by this behaviour, maybe you can figure it out?
The per-directory history files get apparently touched, but not actually written to. Files are writeable by my user of course. Removing .directory-history doesn't help, the directory structure and history files get created, but not pupulated.

function autols() {
    local trdirs
    local cddir
    trdirs=('/storage/code' '/storage/torrents' '/storage/scratch')
    cddir=`pwd -P`

    if [[ ${trdirs[(i)$cddir]} -le $#trdirs ]] then
        ls -tr
    else
        ls
    fi
}

source $HOME/.zsh/zgen/zgen.zsh

if ! zgen saved; then
    #zgen oh-my-zsh

    zgen oh-my-zsh plugins/colorize
    zgen load zsh-users/zsh-syntax-highlighting
    zgen load voronkovich/gitignore.plugin.zsh
    zgen load rimraf/k
    zgen load jimhester/per-directory-history
    zgen oh-my-zsh plugins/per-directory-history
    zgen load oknowton/zsh-dwim
    zgen load knu/zsh-manydots-magic
    zgen oh-my-zsh plugins/pip
    zgen oh-my-zsh plugins/python
    zgen oh-my-zsh plugins/git
    zgen oh-my-zsh plugins/git-extras
    zgen oh-my-zsh plugins/mercurial
    zgen oh-my-zsh plugins/mosh
    zgen oh-my-zsh plugins/tmux
    #zgen oh-my-zsh plugins/tmuxinator
    #zgen oh-my-zsh plugins/catimg
    zgen oh-my-zsh plugins/colored-man
    zgen oh-my-zsh plugins/cp
    zgen oh-my-zsh plugins/extract
    #zgen oh-my-zsh plugins/django
    zgen oh-my-zsh plugins/wakeonlan
    zgen oh-my-zsh plugins/golang
    #zgen oh-my-zsh custom/themes/powerlevel9k
    #zgen load thvitt/tvline
    zgen load zsh-users/zsh-completions
    #zgen load tarruda/zsh-autosuggestions
    zgen load marzocchi/zsh-notify

    zgen save
fi

#zle-line-init() {
#    zle autosuggest-start
#}
#zle -N zle-line-init
#bindkey '^f' vi-forward-word

autoload -Uz manydots-magic
manydots-magic

source $HOME/.zsh/theme.zsh
add-zsh-hook chpwd autols

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds-reproA current minimal reproduction is required

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions