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

Re: `cd .` in non-existent directory leads into weird corner case



On 2012-04-06 01:17:23 +0900, Jun T. wrote:
> On 2012/04/05, at 23:20, Vincent Lefevre wrote:
> >  putting the commands in a file <script>, run with
> > 
> >  <shell> <script>
> 
> Could you please try 'zsh -f <script>' ?

Ah, I didn't know that the .zshenv file was sourced (I was a bit
confused because it was disabled from /etc/zshenv on some other
machine).

xvii% zsh -f ~/wd/src/testcases/dir-test2.sh
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
xvii% zsh ~/wd/src/testcases/dir-test2.sh
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir3/tmpdir2
/tmp/tmpdir1/tmpdir2
xvii% zsh -c ~/wd/src/testcases/dir-test2.sh
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2
/tmp/tmpdir1/tmpdir2

I don't understand why the -c option has any effect (I couldn't
see anything in the man pages).

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



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