binjie jia
binjie jia

Reputation: 1

When using zsh, preexec: parse error in zsh?

when I use zsh, exec this command as follow $ echo "\`" preexec: parse error ` if change back bash, it's OK.

Upvotes: 0

Views: 308

Answers (1)

gregory
gregory

Reputation: 12953

preexec is a hook that runs before the command: "pre-exec"ution. My hunch is you've got some prompt or zsh framework like oh-my-zsh that is choking on "`" character.

preexec

Executed just after a command has been read and is about to be executed. If the history mechanism is active (and the line was not discarded from the history buffer), the string that the user typed is passed as the first argument, otherwise it is an empty string. The actual command that will be executed (including expanded aliases) is passed in two different forms: the second argument is a single-line, size-limited version of the command (with things like function bodies elided); the third argument contains the full text that is being executed.

Upvotes: 1

Related Questions