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

Re: Best practices for managing aliases in ohmyzsh?

On 2021-08-31 5:28 p.m., Bart Schaefer wrote:
No, that's sourcing it. "Giving it a run" would be
4 /aWorking/Zsh/Source/Wk/Junk 0 $ chmod +x ./test
5 /aWorking/Zsh/Source/Wk/Junk 0 $ ./test /tmp/foo

I must be misunderstanding you.
Sourcing a file is not the same as executing a script.

Yikes, I'm missing something fundamental.  In my head, executing a script is identical to sourcing it.  It's not a binary, so what else can there be than interpreting the file?  If a function is declared (yes I know, wrong word but you get my meaning) then the function enters memory, otherwise it's interpret-and-forget until next time, no?  If 'chmod +x' then you don't hafta 'say' 'source me', it's automatic, and it will be found if on the path, etc, but I'm laboring under the idea that nothing else is different.  Is this going to hurt?  I don't understand the lesson of Roman's example, so I think it is going to hurt.

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