bug-bash
[Top][All Lists]
Advanced

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

Re: Feature request for Bash


From: Ryan Cunningham
Subject: Re: Feature request for Bash
Date: Thu, 28 Nov 2013 20:23:07 -0800

Thank you. I will therefore change my mind and suggest this feature _not_ be 
included.

(I could also try

    $ stty kill '@'

for the same reason.)

Sent from my iPad

> On Nov 25, 2013, at 4:09 PM, Bob Proulx <bob@proulx.com> wrote:
> 
> Ryan Campbell Cunningham wrote:
>>    I would like to request that Bash delete the character
>>    immediately preceding a '#', provided the '#'
>> ...
>>    (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.)
> 
> This isn't a feature of the shell but of the tty driver.  It still
> exists.  It is still possible to use it today exactly as it was used
> in Unix V7.
> 
>  $ stty -a | grep --color erase
>  intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> 
>  $ stty erase '#'
> 
>  $ stty -a | grep --color erase
>  intr = ^C; quit = ^\; erase = #; kill = ^U; eof = ^D; eol = <undef>;
> 
> Feel free to try it.
> 
> You can also customize the behavior of your bash libreadline by
> setting the backward-delete-char key binding.  Place the following in
> your $HOME/.inputrc file for example.
> 
>  "#" backward-delete-char
> 
>>    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.
> 
> Oh my, isn't that a complicated set of rules!  That is bound to cause
> trouble.  Not good.  Plus that isn't how it worked in V7 days.
> 
> Bob



reply via email to

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