I have been a user of Bash for some time. I want to learn at least one other shell now, so I have been picking up the Korn Shell. However, it doesn't look like Ksh has had major updates for almost twenty years, and I have read that Zsh incorporates features from it. I have been reading many of the shell comparison questions on the StackExchange network, but have not found an answer to this: Are there features from Korn Shell that Zsh does not incorporate? If so, what are they?

  • 1
    ksh is still in active development. To just scratch the surface, see my long comment (as an answer) at stackoverflow.com/questions/5479433/… . I don't use zsh, partly for corporate reasons, but bahamat's answer below gives some good reasons to look at it. Good luck. – shellter Jun 27 '12 at 23:46
  • 2
    I think zsh has all the major features of ksh93 and most of the minor features, but often with a different syntax for those features that weren't around in 1993. – Gilles Jun 28 '12 at 0:49

Here's the Wikipedia article on command shell comparison.

According to that, the only feature ksh has that zsh doesn't is Named parameters for user defined "types". There may be others as that article is not an exhaustive list, especially for obscure features.

Going in the other direction, the answer to your question could fill a book (possibly this one).

Zsh has many features that ksh doesn't. A few popular ones are command stack, directory stack, history sharing and rprompt.

  • Command Stack is when you're typing a command and you realize that you should run another command first. Just send the current line to the command stack, run the other command then pop the command off the stack. You can do this multiple times. (zsh is the only shell I know of that provides this).
  • Directory Stack (aka pushd/popd) is when you want to change to directories in succession then cd back in reverse order. (Many shells provide this, including bash).
  • History Sharing is where every open shell shares a single common history. Execute a command in one window, switch to another and it will be available in your history.
  • rprompt is just like your prompt, except it's right justified. Many people like to put the cwd or date in the rprompt.

Here are some discussions on Stack Exchange sites about zsh:

  • D'oh. Well, then according to that Wikipedia article, the only feature ksh has that zsh doesn't is Named parameters for user defined "types". – bahamat Jun 29 '12 at 22:07
  • @Kazark: there you go. – bahamat Jun 29 '12 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.