tech-userlevel archive

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

Re: Default behaviour of 'ifconfig'

On Fri, Dec 03, 2010 at 06:23:09PM +0000, Christos Zoulas wrote:
> In article <>,
> David Young  <> wrote:
> >The "?" flag is not a model of usability itself: it does not work
> >consistently across shells unless you backslash-escape it.
> >
> >csh: {1} ifconfig -?
> >ifconfig: No match.
> >
> >tcsh:~> ifconfig -?
> >ifconfig: No match.
> >
> >sh$ ifconfig -?
> >ifconfig: unknown option -- ?
> >usage: ifconfig [-h] [-m] [-v] [-z] [-L] interface ...
> You are supposed to know how globbing works in your shell. Otherwise
> PEBKAC, and it is not the "?"'s fault.

PEBKAC?  You have let the programmers off too easily for their mistakes.

tcsh and csh are giving awful feedback:

csh: {1} ifconfig -?
ifconfig: No match.

Ifconfig said what?!  Oh, this is a message form the shell masquerading
as a message from ifconfig.  It's so rarely that I see that error
message that it will still take me by surprise, and I've used (t)csh
since 1993.

To use a bare ? for pattern matching probably made sense forty years
ago, given the technology of the day.  Today, I think a chord such as
Alt-? might be more appropriate, but we're using a 40 year-old terminal
abstraction.  (Might be time for an update....)  Regardless, the shell
should visually indicate the special status of the character using
color, reverse-video, or underscoring, when the terminal supports that.

Maybe -? was chosen before ? was a glob, or the other way around.  In
retrospect, it's an unfortunate choice because of the collision.


David Young             OJC Technologies      Urbana, IL * (217) 278-3933

Home | Main Index | Thread Index | Old Index