[Top][All Lists]

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

Re: Feature request for Bash

From: Pierre Gaston
Subject: Re: Feature request for Bash
Date: Mon, 25 Nov 2013 09:46:56 +0200

On Mon, Nov 25, 2013 at 9:38 AM, Pierre Gaston <address@hidden>wrote:

> On Mon, Nov 25, 2013 at 6:04 AM, Ryan Campbell Cunningham <
> address@hidden> wrote:
>> Configuration Information [Automatically generated]:
>> Machine: x86_64
>> OS: linux-gnu
>> Compiler: gcc
>> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
>> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
>> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
>> -DSHELL -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib
>> -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4
>> -Wformat -Werror=format-security -Wall
>> uname output: Linux ryan-MacBook 3.11.0-12-generic #19-Ubuntu SMP Wed Oct
>> 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
>> Machine Type: x86_64-pc-linux-gnu
>> Bash Version: 4.2
>> Patch Level: 45
>> Release Status: release
>> Description:
>>     I would like to request that Bash delete the character
>>     immediately preceding a '#', provided the '#'
>>        * does not begin a new word,
>>        * is not included in any quoted string or variable,
>>        * is not preceded by a '\', and
>>        * is only found in an interactive command line (not
>>          in a script* or Bash initialization argument).
>>     An exception: If the character immediately preceding
>>     is also a '#', Bash should skip backward to the previous
>>     non-'#' character and delete as much characters as the
>>     number of consecutive '#' characters after them in the
>>     same word.
>>     Before enabling this feature, Bash should check if the
>>     terminal has support for the Backspace key and/or for
>>     the Delete key. If Bash could not find support for
>>     either key, then this feature should be enabled and any
>>     attempt to disable this feature should be denied. There
>>     should also be options to manually enable this feature,
>>     if either key is broken but still works, or if both keys
>>     are broken but still work. Those options should be
>>        * to enable the feature through a command line**;
>>        * to enable the feature through a "bashrc" or
>>          "bash_profile" file, which Bash loads at startup***;
>>          and
>>        * to enable the feature through a build-time option.
>>     The build-time options should be to hard-code the feature
>>     so it is always enabled****, or to allow the user to enable
>>     and disable it*****.
>>     (The request was inspired by an article in the seventh
>>     edition of the UNIX Programmer's Manual. This feature
>>     is not required by POSIX, but came from the traditional
>>     Bourne shell.)
>>     *Bash should be able to enable this feature in a script
>>     by force (using the --sd-script-force initialization
>>     option and the "sd-script-force" "shopt" option).
>>     **Either through the "shopt" option "sharp-delete" or the
>>     initialization command "bash --sharp-delete".
>>     ***In the same manner as is done on a command line.
>>     ****Through the "configure" option
>>     "--with-sharp-delete-always".
>>     *****Or to not build it at all, with the option
>>     "--without-sharp-delete" or the option "--no-sharp-delete".
>> There are a lot of details and even an obscure reference, but I don't
> understand what you want (something to happen when you press the delete
> key?) or why it would be interesting.
Oh now I remember seeing this.
You basically want # to act like the delete key, like in the old days
before interactive terminals.

reply via email to

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