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

Re: Best practices for managing aliases in ohmyzsh?



On Wed, Sep 1, 2021, at 11:58 AM, Ray Andrews wrote:
> Ok, that's all transparent.  What puzzles me is why the now executable 
> file won't run Roman's example.  Just tried it, and indeed it doesn't 
> work.  Lots of test lines work but not the 'mkdir' and not the 'cd'.

No.  Those commands do work.  You are either invoking the example
incorrectly or testing the results incorrectly.

> 'cd' being a builtin I'm wondering why it doesn't work in an executed file:
> 
>      #!/usr/bin/zsh
>      echo "This echos just fine"
>      cd -- "/tmp"
> 
> ... no 'cd'.

https://mywiki.wooledge.org/BashFAQ/060
https://mywiki.wooledge.org/BashGuide/Sourcing

-- 
vq




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