Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.3.1 crashes on completion



On May 13, 10:02am, ChenYao wrote:
} 
}  I find that "setopt histignorealldups" in my zshrc causes the crash.
} 
} Reproduce from "zsh -f":
} 
} # setopt histignorealldups
} # echo $ZSH_VERSION
} # `r`<press tab here, then crash>

For the record, the interactive parent shell doesn't crash, the shell
that crashes is the one executing the "r" command in the subshell
created by the substitution.

Also for the record it's relatively dangerous to run "r" in backticks
in the first place, because if you do it twice in a row (or even do it
once and then follow that with "r" with no backticks) the shell will
end up in an infinite loop.  The failsafe code that keeps "r" from
re-executing itself is defeated by the quotes.

The crash occurs when the history in the subshell is updated to remove
the duplicate of the previous command.  Adding new history events is
disabled in subshells so the new event that is supposed to replace the
old one does not exist, and the code wanders off into neverland.

I'm not exactly sure where to fix this, or whether there's something
that can be done about the infinite loop (other than disabling "r"
in subshells entirely).



Messages sorted by: Reverse Date, Date, Thread, Author