[gnu.bash.bug] Stty kill and bash: Bug or philosophy?

john@hopf.math.nwu.edu (John Franks) (06/13/89)

Here's an excerpt from readline.c in version 0.99

>/* Here is C-u doing what Unix does.  You don't *have* to use these
>   key-bindings.  We have a choice of killing the entire line, or
>   killing from where we are to the start of the line.  We choose the
>   latter, because if you are a Unix weenie, then you haven't backspaced
>   into the line at all, and if you aren't, then you know what you are
>   doing. */
>rl_unix_line_discard ()

Well, I disagree with the choice made here.  You might well say, "Then
bind  C-u to whatever you want it to be in your .inputrc." The problem
is there doesn't seem to be a function which kills the  _entire_  line
even if the point is in the middle.  At the very least there should be
such a function.  And rl_unix_line_discard() is a reasonable name  for
it.   I point out there is another function which kills from the point
to the beginning of the line, so people who want to do that  can  bind
C-u to it.  

Here's some further comment on the way this  should  work,  IMHO.   In
Unix  it  is  not  C-u  which kills a line, it is whatever character I
happen to have stty'ed to be my kill character (the default is C-u  on
some  systems).   One  could  decide  that  the stty characters: kill,
erase, werase, susp, etc.  are now obsolete.  But it wouldn't be  very
hard to incorporate them.  I should have the option of binding my stty
kill character to a function  which  kills  the  entire  line  (or  to
anything else for that matter), and to bind my stty erase character to
backward-delete-char, etc.  Then when I type my erase char, whatever I
have  stty'ed  it to, it will do what I think the stty erase character
should.  

Any comments?



John Franks 	Dept of Math. Northwestern University
		Internet	john@math.nwu.edu
		Bitnet		j_franks@nuacc