[Top][All Lists]

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

cd dir1 dir2...: how can we allow this?

From: Dan Jacobson
Subject: cd dir1 dir2...: how can we allow this?
Date: Mon, 21 Apr 2003 04:12:00 +0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

The following message is a courtesy copy of an article
that has been posted to comp.unix.shell as well.

I say it is never too late to make the GNU/Linux cd command barf if it
gets more than one argument.  Say long ago I did
$ mkdir astronomy astroturf
And now I forgot about one of them and proceed to save keystrokes one
day with
$ cd as*&&make
and end up launching the space shuttle by accident.

Even if "the spec says cd dir1 dir2 ... is undefined" or something,
are there any arguments against making it return an error?

At least there could be a variable/switch the user could set to catch
errors?  I mean say even (bash's) man page says
       cd [-L|-P] [dir]
and not
       cd [-L|-P] [dir ...]
http://jidanni.org/ Taiwan(04)25854780

reply via email to

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