Re: flag for quiet CDPATH

2014-01-21 Thread Elliott Forney
These are both good solutions, I was unaware of the builtin keyword or that redirection could come before the command :) Since cd doesn't appear to print anything else to stdout I would probably support leaving things as they are. Thanks!

Re: flag for quiet CDPATH

2014-01-21 Thread Chet Ramey
On 1/21/14 1:39 PM, Linda Walsh wrote: > > > Lionel Cons wrote: >> 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). > >

Re: flag for quiet CDPATH

2014-01-21 Thread Chet Ramey
On 1/21/14 12:30 PM, Lionel Cons wrote: > On 21 January 2014 01:16, Elliott Forney 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

Re: flag for quiet CDPATH

2014-01-21 Thread Linda Walsh
Lionel Cons wrote: 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). --- But the above doesn't work. The echo happens on stdo

Re: flag for quiet CDPATH

2014-01-21 Thread Lionel Cons
On 21 January 2014 01:16, Elliott Forney 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

Re: flag for quiet CDPATH

2014-01-20 Thread Elliott Forney
> +1 and `cd -' has the similar problem. So, I guess there are several cases to consider. 1. CDPATH 2. cdable_vars 3. - 4. cdspell I have attached another patch that would prevent echoing the path in all of these cases with the `-q` option. --- builtins/cd.def.orig 2014-01-20 16:52:02.00

Re: flag for quiet CDPATH

2014-01-20 Thread Clark WANG
On Tue, Jan 21, 2014 at 8:16 AM, Elliott Forney 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

flag for quiet CDPATH

2014-01-20 Thread Elliott Forney
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