bug-bash
[Top][All Lists]
Advanced

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

Re: cd *


From: Chet Ramey
Subject: Re: cd *
Date: Mon, 26 Feb 2001 09:07:18 -0500

> $ cd /tmp /var
> $ echo $?
> 0
> $ pwd
> /tmp
> $ cd --help
> bash: cd: illegal option: --
> cd: usage: cd [-PL] [dir]
> 
> Observations: 1. bash doesn't feel bad about more than one argument to
> cd.

No, it doesn't.  Bourne shells never have.

> 2. --help should be implemented.

I prefer not to litter the builtins with --help and --version, given the
presence of the `help' builtin and $BASH_VERSION.

> 3. -P, -L should be explained,

`help cd' says:

        [...]
    The -P option says to use the physical directory structure
    instead of following symbolic links; the -L option forces symbolic links
    to be followed.

> lest one need to wait for the whole bash manual to pop up.  Wait,
> before any, um, excuses are made, shouldn't any of this behaviour
> produce even one warning message about multiple arguments?:

If you want such behavior, it's trivial to write a shell function to do it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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