[Top][All Lists]

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

Re: Can I get a hint, please?

From: Bruce Korb
Subject: Re: Can I get a hint, please?
Date: Sat, 07 Oct 2006 07:09:35 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

> http://lists.gnu.org/archive/html/bug-bash/2006-09/msg00068.html

I gave it a quick try on Red Hat linux with the bash-3.2 release
candidate, and ran `echo $MYPID' about 15 times without error.


Hi Chet,

Cool.  I'll have to get the up-to-date bash and give it a try.
That's a problem here at home, though, 'cuz of dependencies
I have to update the world.  Oh, well.  Thank you!

I don't suppose I could convince you to go ahead and plug $MYPID
into future bash releases?  :)

As long as I'm being chatty, there has been a discussion recently
on the Austin Group reflector titled, "Re: USG Guideline 9"
that had to do with the handling of misordered command line options.
David Korn et al. were speculating on the possibility of making
the shell have an option of auto-correcting argument order so that
the command itself would never have to mess with reordering its
own arguments.  (This is a problem because various GNU utilities
like "ls" are not POSIX compliant because they do things that
a conforming application (shell script) would not expect.)

That got me thinking.  csh/bash have this cute feature of giving
hints when the tab key is pressed.  Programs nowadays are elf
and elf allows for arbitrary sections to be added into a binary
that won't affect the execution.  Suppose, for example, there
were a section named, ".options" and it contained a magic number
to ensure the right version of the right thing were being looked
at.  Now if someone presses "tab" after the command name you could
actually emit real usage text.  :)  Further, in answer to David's
auto-reordering suggestion, with that option the arguments can
be scanned and you'll know if the ``-l'' flag takes an argument
or not and, thus, be able to correctly reorder.

I think it an amusing idea.  I have the code for doing something
like this:


In the last decade, I've incompatably altered the option data structure
once, about two years ago.  It's fairly stable.  So, I can piece
something together.  It'd be nice if it were a loadable module,
but with needing hooks into command completion, I'm guessing it
is unlikely.  Before I start (and spend a couple of months fiddling
with it -- time constraints), I would like to know if it would
get tossed out-of-hand or not.  I don't want to be wasting my time.
Thanks! - Bruce

reply via email to

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