egor7
egor7

Reputation: 4950

zsh invocation -s flag

In documentation (man zsh, Invocation section) we find that zsh -s forces the shell to read commands from the standard input. If the -s flag is not present and an argument is given, the first argument is taken to be the pathname of a script to execute."

Can you give an example, please, how to force the first argument to be a pathname of script to execute?

Upvotes: 0

Views: 474

Answers (1)

jackrabbit
jackrabbit

Reputation: 5663

The "forcing" refers to the flag causing the shell to read commands from standard input. You don't have to do anything special to make the shell execute a script: zsh script.

Actually, it's not simply the first argument that is used as the script location. The zshall manpage "Invocation" section contains the following example: zsh -x -o shwordsplit scr. Here scr is the script to be executed while the rest of the arguments are other options.

Upvotes: 2

Related Questions