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

Bug in "dirs a b c" where a b c are relative paths?



Hi, all.  I did a quick search and didn't find this potential 3.0.7
bug mentioned in change lists... I hope this isn't a repeat.  It
seems familiar somehow.  Anyway, here goes:

I'm still working on the third edition of O'Reilly's "Unix Power Tools"
...and still rummaging around the zsh manpages for tidbits that fit.
In one of the articles about directory stacks, in the section on
clearing the stack, I was playing with the zsh command "dirs a b c d".
It replaces the stack contents with the directories a b c and d.
I think this has trouble when the directory pathnames are relative
(don't start with a /).

For example, I made five subdirectories in /tmp named a b c d and e.
Then I added them all to the stack.  Watch what happened:

	zsh% pwd 
	/tmp
	zsh% ls -Fd ?
	a/  b/  c/  d/  e/
	zsh% dirs ?
	zsh% dirs
	/tmp a b c d e
	zsh% pushd +2
	/tmp/b c d e /tmp a
	zsh% pushd +2
	pushd: no such file or directory: d

When "dirs a b c d e" puts directories on the stack, should it convert
any relative pathnames to absolute?  Or does the manpage need a warning?

Jerry
-- 
Jerry Peek, web@xxxxxxxxx, http://www.jpeek.com/



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