Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Best practices for managing aliases in ohmyzsh?



On 2021-09-01 1:53 p.m., Lawrence Velázquez wrote:
Even before getting to language mismatches, it generally doesn't
make sense to source a file that has a shebang because such a file
probably assumes that it'll be run in a separate process.
That's just the point I wanted to clear up.  As I now understand it, the shebang will be completely ignored when sourcing although it had occurred to me that it might force a separate process.  But experiments here show that does not happen.  Steve says the same thing.  So, when 'dot' or 'source' starts the command, that what is in the file will be zsh code is already expected.  But when we execute, nothing is presumed and the shebang is read and a separate process is started.   Quite sensible.




Messages sorted by: Reverse Date, Date, Thread, Author