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

Re: [ksh emulation] zle and bindkey commands not available when called from /etc/kshrc



On Sep 11,  9:57am, Tristan TERPELLE wrote:
}
} The zmodload zsh/zle command works beautifully! I've added the
} following lines to /etc/kshrc
} 
} autoload -Uz edit-command-line
} zmodload -i zsh/zle
} bindkey -M vicmd 'v' edit-command-line

Those are going to cause errors if anyone runs an actual ksh or pdksh.
Maybe that's not a concern for you, but in general this should be
wrapped in something like

if [[ -n "$ZSH_VERSION" ]]; then

Or even just

if zmodload -i zsh/zle 2>/dev/null; then



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