-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruce Korb on 10/7/2006 8:09 AM: > 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.
Bash already has programmable tab completion, although I'm not sure if you would be able to hook argument reordering into it easily. But PLEASE don't assume the entire world is elf. Bash is ported to a number of non-elf platforms, such as PE-COFF of Windows. Hooking in a readline command that examines the command enough to know which options take arguments so that reordering will not change the semantics of the command sounds admirable, but doing so by parsing the target executable just does not sound like the right approach to me. We don't need to bloat bash by adding all of the binutils capabilities into it. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFJ91h84KuGfSFAYARAliSAJ0SMZxdF0APVQKolug34SiRr7S2NACeIJ9r b8TK6UyvYrZydJ7AuJwo2Lc= =iWgW -----END PGP SIGNATURE----- _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash