Re: Get Terminal to Echo line in buffer on backspace

2021-09-02 Thread Greg Wooledge
On Thu, Sep 02, 2021 at 05:44:33AM +0200, Thomas Anderson wrote: > Thanks for the insightful replies. > > I think I am getting closer to a solution. > > Wouldn't it be possible to bind the "redraw-current-line" to the delete > (ASCII DEL), i.e. Alt 127?? > > And, just add that to my user's bash

Re: Get Terminal to Echo line in buffer on backspace

2021-09-01 Thread Thomas Anderson
Thanks for the insightful replies. I think I am getting closer to a solution. Wouldn't it be possible to bind the "redraw-current-line" to the delete (ASCII DEL), i.e. Alt 127?? And, just add that to my user's bash file? I am thinking out loud, not sure this would work. Also, yes. Zsh, I wi

Re: Get Terminal to Echo line in buffer on backspace

2021-09-01 Thread David Wright
On Tue 31 Aug 2021 at 10:40:06 (-0400), Greg Wooledge wrote: > On Tue, Aug 31, 2021 at 09:07:49AM -0500, David Wright wrote: > > Bound or unbound, I couldn't make ESC 1 Ctrl-L do anything useful > > while output is in progress (like a clean display of the typeahead > > so far typed). I couldn't see

Re: Get Terminal to Echo line in buffer on backspace

2021-08-31 Thread David Wright
On Tue 31 Aug 2021 at 16:13:52 (+0200), Nicolas George wrote: > David Wright (12021-08-31): > > The only useful effect of that binding that I've seen is not when > > typing ahead, but at the normal command line > > Of course. When typing ahead, your shell's line editor is not in action, > and ther

Re: Get Terminal to Echo line in buffer on backspace

2021-08-31 Thread Greg Wooledge
On Tue, Aug 31, 2021 at 09:07:49AM -0500, David Wright wrote: > Bound or unbound, I couldn't make ESC 1 Ctrl-L do anything useful > while output is in progress (like a clean display of the typeahead > so far typed). I couldn't see a way to force echoing the line at > that time. ?? > Six decades o

Re: Get Terminal to Echo line in buffer on backspace

2021-08-31 Thread Nicolas George
David Wright (12021-08-31): > The only useful effect of that binding that I've seen is not when > typing ahead, but at the normal command line Of course. When typing ahead, your shell's line editor is not in action, and therefore its bindings will have no effect immediately. They will have an effe

Re: Get Terminal to Echo line in buffer on backspace

2021-08-31 Thread David Wright
On Mon 30 Aug 2021 at 11:39:14 (-0400), Greg Wooledge wrote: > On Mon, Aug 30, 2021 at 05:05:49PM +0200, Nicolas George wrote: > > With Zsh, there is the "redisplay" zle command, it does exactly that: > > redraw the prompt and command without clearing the screen. > > > > I do not know if readline,

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread songbird
Greg Wooledge wrote: ... > You simply aren't going to get that behavior. So I'm telling you how > you can work around the problem, or fix your *underlying problem*. i agree, if you have something sending information to a console or terminal, you can just open up another terminal or tab and then

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Greg Wooledge
On Mon, Aug 30, 2021 at 05:05:49PM +0200, Nicolas George wrote: > With Zsh, there is the "redisplay" zle command, it does exactly that: > redraw the prompt and command without clearing the screen. > > I do not know if readline, used by bash, has the same feature available. Interesting. I've neve

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Nicolas George
Greg Wooledge (12021-08-30): > What you want to do is redraw the current command. The easiest way to > do this is to press Ctrl-L. (Or if you're in vi mode, ESC Ctrl-L, and > then you'll need to go back to command mode.) > > This clears the whole screen, though. So if there's information you >

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Nicolas George
Thomas Anderson (12021-08-30): > It's hard for me to describe, so here is an example of I am looking to > emulate (this is from a mac). > > https://cloud.little-beak.com/s/KxpjEHJ5RTEYZmS Are you typing the ^R that appear on the screen? What is the shell you are using? Does it have a line editor

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Greg Wooledge
> On 30/08/2021 14:41, Greg Wooledge wrote: > > What you want to do is redraw the current command. The easiest way to > > do this is to press Ctrl-L. (Or if you're in vi mode, ESC Ctrl-L, and > > then you'll need to go back to command mode.) (I mis-spoke slightly. I meant "exit from command mod

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Thomas Anderson
It's hard for me to describe, so here is an example of I am looking to emulate (this is from a mac). https://cloud.little-beak.com/s/KxpjEHJ5RTEYZmS On debian, I have tried many different terminal emulators, and all the visible options to get this type of behavior, but have failed. =( On 30/08/

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Nicolas George
Thomas Anderson (12021-08-30): > I would really like to be able to use terminal in such a way that when I > backspace, it will echo the line I am currently typing > > 1. say if I am receiving data into the terminal window, and > > 2. I have *not* pressed carriage return. > > My issue is: if I am

Re: Get Terminal to Echo line in buffer on backspace

2021-08-30 Thread Greg Wooledge
On Mon, Aug 30, 2021 at 12:26:32PM +0200, Thomas Anderson wrote: > My issue is: if I am typing to terminal, while receiving data, and I > backspace -- I just don't know how far I have backspaced, I have to guess. What you want to do is redraw the current command. The easiest way to do this is to