bug-bash
[Top][All Lists]
Advanced

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

Re: cd with multiple arguments?


From: Chet Ramey
Subject: Re: cd with multiple arguments?
Date: Thu, 09 Dec 2010 20:41:04 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2

On 12/9/10 11:30 AM, Eric Blake wrote:
> On 09/23/2010 10:47 AM, Keith Thompson wrote:
>> I'm not sure whether this is a bug (the documentation doesn't address
>> this case), but it's at least mildly annoying.
>>
>> If you invoke the "cd" commands with extra arguments after the directory
>> name, all the extra arguments are silently ignored.
> 
> I would really love it if bash copied the zsh behavior here:
> 
> cd a b
> 
> tries to find a directory matching the extglob
> 
> a+([$' \t'])b
> 
> and fails if there are multiple matches or no matches.  Certainly less
> typing than remembering to quote the argument, via cd 'a b'.

It's trivial to write a shell function to do that, and many other things.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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