Sample Header Ad - 728x90

"history -0" works in ksh, why doesn't "history -0" work in zsh?

-1 votes
1 answer
70 views
Why does ksh history -0 (last command which is the history command itself) work, yet zsh it fails (only history -1 avail on my zsh). I tried zsh -f to use default options and it still fails. I'm using ksh version Version AJM 93u+ 2012-08-01 and Zsh v5.9 on MacOS. This question is about the history command and not preexec() to get the current command.
Asked by atod (155 rep)
Jan 31, 2025, 04:51 AM
Last activity: Mar 10, 2025, 07:33 AM