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

Re: HOW TO distiguish between command input and forked subshell ?



> if I cd to non-local directory using CDPATH, cd will report current
> directory after changing to it. I always found it boring (as I have
> directory in prompt anyway) and suggested the option to shut it off. The
> answer was (as expected ;) that I can use
> 
> cd () { builtin cd $* > /dev/null }
> 
> Well, it works, but any output from chdir() is also lost :( I don't
> know, if it is right, that chdir() is using the same descriptor as cd, but
> if it is to be so, may be new option is still useful? 

I assume that chdir above was really ment to be chpwd.  Chpwd output is not
lost if it is redirected to stderr.

Zoltan



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