1

While reading the answers of question Can bash write to its own input stream?, I found the following command runs on zsh but not on bash :

print -z echo mnciitbhu

1 . Is -z an extension to the print command? If yes, how do I define my own extensions?

2 . If not, why is the above command not running in bash but running in zsh?

0x6773
  • 115

1 Answers1

2

In zsh, print is a built-in command. (And, in bash, printf is a built-in command.) The command, /usr/bin/print, is used to run mailcap programs. The -z switch is defined this way from the zsh manual:

Push the arguments onto the editing buffer stack, separated by spaces; no escape sequences are recognized.

Christopher
  • 15,911