Skip to content

Commit e4f7c98

Browse files
MSchclaude
andcommitted
Fix chpwd error when DIRSTACKSIZE is unset by Claude Code
Add null check for DIRSTACKSIZE variable before numeric comparison to prevent shell errors when Claude Code unsets the environment variable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9bf484d commit e4f7c98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

etc/zsh/zshrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,7 @@ if zstyle -T ':grml:chpwd:dirstack' enable; then
15371537

15381538
function chpwd () {
15391539
(( ZSH_SUBSHELL )) && return
1540+
[[ -z $DIRSTACKSIZE ]] && return
15401541
(( $DIRSTACKSIZE <= 0 )) && return
15411542
[[ -z $DIRSTACKFILE ]] && return
15421543
grml_dirstack_filter $PWD && return

0 commit comments

Comments
 (0)