[issue1567] grml-zshrc: broken dirstack handling

Michael Prokop bts at bts.grml.org
Thu Jul 30 16:32:49 CEST 2015


Michael Prokop <mika at grml.org> added the comment:

Thanks for your patch, Frank. Issue doesn't seem to be resolved yet.
C/P of a plain Debian system with bash as default shell and switching to zsh
explicitely (no other shell session present and I typed 'exit' explicitly to
make it obvious what's going on):

root at debian-jessie-plain:~# zsh
+/etc/zsh/zshrc:1594> DIRSTACKSIZE=20 
+/etc/zsh/zshrc:1595> DIRSTACKFILE=/root/.zdirs 
+/etc/zsh/zshrc:1597> typeset -gaU GRML_PERSISTENT_DIRSTACK
+/etc/zsh/zshrc:1624> [[ -f /root/.zdirs ]]
+/etc/zsh/zshrc:1624> [[ 0 -eq 0 ]]
+/etc/zsh/zshrc:1628> [[ -d '' ]]
+/etc/zsh/zshrc:1630> [[ -d '' ]]
+/etc/zsh/zshrc:1633> zstyle -T :grml:chpwd:dirstack filter-on-load
+/etc/zsh/zshrc:1645> set +x
root at debian-jessie-plain ~ # cat .zdirs 
/root
root at debian-jessie-plain ~ # cd /etc/zsh
+chpwd:2:else> ((  20 <= 0  ))
+chpwd:3:else> [[ -z /root/.zdirs ]]
+chpwd:4:else> grml_dirstack_filter /etc/zsh
+grml_dirstack_filter:1:> setopt local_options xtrace
+grml_dirstack_filter:2:> local -a exclude
+grml_dirstack_filter:3:> local filter entry
+grml_dirstack_filter:4:if> zstyle -s :grml:chpwd:dirstack filter filter
+grml_dirstack_filter:7:if> zstyle -a :grml:chpwd:dirstack exclude exclude
+grml_dirstack_filter:12:> return 1
+chpwd:5:else> GRML_PERSISTENT_DIRSTACK=( /etc/zsh ) 
+chpwd:8:else> print -l /etc/zsh
root at debian-jessie-plain /etc/zsh # cd /usr/sbin
+chpwd:2:else> ((  20 <= 0  ))
+chpwd:3:else> [[ -z /root/.zdirs ]]
+chpwd:4:else> grml_dirstack_filter /usr/sbin
+grml_dirstack_filter:1:> setopt local_options xtrace
+grml_dirstack_filter:2:> local -a exclude
+grml_dirstack_filter:3:> local filter entry
+grml_dirstack_filter:4:if> zstyle -s :grml:chpwd:dirstack filter filter
+grml_dirstack_filter:7:if> zstyle -a :grml:chpwd:dirstack exclude exclude
+grml_dirstack_filter:12:> return 1
+chpwd:5:else> GRML_PERSISTENT_DIRSTACK=( /usr/sbin /etc/zsh ) 
+chpwd:8:else> print -l /usr/sbin /etc/zsh
root at debian-jessie-plain /usr/sbin # exit
root at debian-jessie-plain:~# cat .zdirs 
/usr/sbin
/etc/zsh
root at debian-jessie-plain:~# zsh
+/etc/zsh/zshrc:1594> DIRSTACKSIZE=20 
+/etc/zsh/zshrc:1595> DIRSTACKFILE=/root/.zdirs 
+/etc/zsh/zshrc:1597> typeset -gaU GRML_PERSISTENT_DIRSTACK
+/etc/zsh/zshrc:1624> [[ -f /root/.zdirs ]]
+/etc/zsh/zshrc:1624> [[ 0 -eq 0 ]]
+/etc/zsh/zshrc:1628> [[ -d '' ]]
+/etc/zsh/zshrc:1630> [[ -d '' ]]
+/etc/zsh/zshrc:1633> zstyle -T :grml:chpwd:dirstack filter-on-load
+/etc/zsh/zshrc:1645> set +x
root at debian-jessie-plain ~ # cat .zdirs 
/usr/sbin
/etc/zsh
root at debian-jessie-plain ~ # cd -
No matches for: `directory stack', `local directory', or `file'

root at debian-jessie-plain ~ # exit    
root at debian-jessie-plain:~# zsh
+/etc/zsh/zshrc:1594> DIRSTACKSIZE=20 
+/etc/zsh/zshrc:1595> DIRSTACKFILE=/root/.zdirs 
+/etc/zsh/zshrc:1597> typeset -gaU GRML_PERSISTENT_DIRSTACK
+/etc/zsh/zshrc:1624> [[ -f /root/.zdirs ]]
+/etc/zsh/zshrc:1624> [[ 0 -eq 0 ]]
+/etc/zsh/zshrc:1628> [[ -d '' ]]
+/etc/zsh/zshrc:1630> [[ -d '' ]]
+/etc/zsh/zshrc:1633> zstyle -T :grml:chpwd:dirstack filter-on-load
+/etc/zsh/zshrc:1645> set +x
root at debian-jessie-plain ~ # cat .zdirs 
/usr/sbin
/etc/zsh
root at debian-jessie-plain ~ # cd /usr/bin
+chpwd:2:else> ((  20 <= 0  ))
+chpwd:3:else> [[ -z /root/.zdirs ]]
+chpwd:4:else> grml_dirstack_filter /usr/bin
+grml_dirstack_filter:1:> setopt local_options xtrace
+grml_dirstack_filter:2:> local -a exclude
+grml_dirstack_filter:3:> local filter entry
+grml_dirstack_filter:4:if> zstyle -s :grml:chpwd:dirstack filter filter
+grml_dirstack_filter:7:if> zstyle -a :grml:chpwd:dirstack exclude exclude
+grml_dirstack_filter:12:> return 1
+chpwd:5:else> GRML_PERSISTENT_DIRSTACK=( /usr/bin ) 
+chpwd:8:else> print -l /usr/bin
root at debian-jessie-plain /usr/bin # cat ~/.zdirs 
/usr/bin
root at debian-jessie-plain /usr/bin # exit
root at debian-jessie-plain:~# cat ~/.zdirs 
/usr/bin
root at debian-jessie-plain:~#

----------
assignedto: ft
messages: 5192, 5193, 5197
nosy: ft, mika
priority: bug
status: chatting
title: grml-zshrc: broken dirstack handling

_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue1567>
_____________________________________


More information about the Bugs-changes mailing list