bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flag for quiet CDPATH


From: Lionel Cons
Subject: Re: flag for quiet CDPATH
Date: Tue, 21 Jan 2014 18:30:57 +0100

On 21 January 2014 01:16, Elliott Forney <address@hidden> wrote:
> I find it a little unpleasant that cd echoes the new working directory
> when CDPATH is used to locate the new directory (I already have the
> working directory in my prompt).  I understand that this is behavior
> is mandated by POSIX but I wonder if we could have an option that
> disables this.
>
> Maybe if the `cd' builtin had an option, say `-q', that would cause it
> to be quit if CDPATH is used.  Then, I could simply
>
> alias cd='cd -q'
>
> and put a stop to this.  I have attached a proposed patch, any thoughts?

Yes, adding yet another option which can be implemented using POSIX
behaviour is IMHO code bloat. Just use alias cd='2>"/dev/null" cd '
(yes, POSIX mandates that re-directions can be prefixed and not only
postfixed).

Lionel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]