[Top][All Lists]

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

cd with multiple arguments?

From: Keith Thompson
Subject: cd with multiple arguments?
Date: Wed, 08 Dec 2010 15:51:35 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

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 noticed this when I accidentally typed a '/' when I meant to type ';'
in a long command:

    ( cd /some/dir / execute some command )

rather than the intended:

    ( cd /some/dir ; execute some command )

and didn't get an error or warning message -- and of course the command
wasn't executed.

$ uname -a
Linux kvetch 2.6.28-19-generic #64-Ubuntu SMP Wed Aug 18 20:55:57 UTC
2010 i686 GNU/Linux
$ cat /etc/*release
$ cd /tmp and all following arguments are silently ignored
$ pwd
$ dirs

3.2.48 is the version installed by Ubuntu.  I see the same issue with
bash version 4.1.0(1)-release (compiled from source on the same system).

(For what it's worth, tcsh and ksh both give error messages.)

Keith Thompson (The_Other_Keith) address@hidden  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

reply via email to

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