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?

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.

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.