Re: [OT] Re: how to start in "overwrite-mode"

2009-10-29 Thread Marc Herbert
Chet Ramey a écrit : > Functions were the last thing added to sh by Steve Bourne before he > left Bell Labs (he finished in 1983) >From Steve Bourne himself: (very interesting interview)

Re: how to start in "overwrite-mode"

2009-10-29 Thread Stephane CHAZELAS
2009-10-29, 07:23(+00), Stephane CHAZELAS: > 2009-10-28, 20:28(-04), Dave Rutherford: > [...] >> Add to .Xdefaults: XTerm*answerbackString: ^[[2~ >> Add to .bashrc (and .profile if it doesn't source .bashrc): >> bind '"^[[2~": overwrite-mode' >> PROMPT_COMMAND='echo -n ^E' > [...] > > Along

Re: how to start in "overwrite-mode"

2009-10-29 Thread Stephane CHAZELAS
2009-10-28, 20:28(-04), Dave Rutherford: [...] > Add to .Xdefaults: XTerm*answerbackString: ^[[2~ > Add to .bashrc (and .profile if it doesn't source .bashrc): > bind '"^[[2~": overwrite-mode' > PROMPT_COMMAND='echo -n ^E' [...] Along those lines, you could use the TIOCSTI ioctl. That woul

Re: how to start in "overwrite-mode"

2009-10-28 Thread Dave Rutherford
On Tue, Oct 27, 2009 at 16:29, Jim Lawson wrote: > I have a user we're trying to encourage to migrate from tcsh to bash, > who is used to his shell starting up in overwrite mode (as opposed to > the default Insert mode.) > > Long story short, while I can easily bind a key to the "overwrite-mode" >

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Chet Ramey
Stephane CHAZELAS wrote: > 2009-10-28 11:06:09 -0400, Chris F.A. Johnson: >> On Wed, 28 Oct 2009, Greg Wooledge wrote: >> >>> On Wed, Oct 28, 2009 at 02:00:53PM +, Stephane CHAZELAS wrote: I can understand it. I was more curious about the origins. After all, that breaks Bourne backwar

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Stephane CHAZELAS
2009-10-28 11:06:09 -0400, Chris F.A. Johnson: > On Wed, 28 Oct 2009, Greg Wooledge wrote: > > > On Wed, Oct 28, 2009 at 02:00:53PM +, Stephane CHAZELAS wrote: > > > I can understand it. I was more curious about the origins. After > > > all, that breaks Bourne backward compatibility (in a shel

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Chris F.A. Johnson
On Wed, 28 Oct 2009, Greg Wooledge wrote: > On Wed, Oct 28, 2009 at 02:00:53PM +, Stephane CHAZELAS wrote: > > I can understand it. I was more curious about the origins. After > > all, that breaks Bourne backward compatibility (in a shell > > called Bourne-again shell) > > Bourne shell has no

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Greg Wooledge
On Wed, Oct 28, 2009 at 02:00:53PM +, Stephane CHAZELAS wrote: > I can understand it. I was more curious about the origins. After > all, that breaks Bourne backward compatibility (in a shell > called Bourne-again shell) Bourne shell has no functions at all. > Has there be historical versions

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Stephane CHAZELAS
2009-10-28 09:46:49 -0400, Chet Ramey: [...] > >> The Posix grammar has never allowed it (a `function_body' must be a > >> compound command, and that's what bash implements), and there has > >> never been sufficient demand to add it as an extension. > > [...] > > > > It's never allowed it to POSI

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Chet Ramey
Stephane CHAZELAS wrote: > 2009-10-28 09:00:59 -0400, Chet Ramey: >>> zle-line-init() zle overwrite-mode >>> zle -N zle-line-init >>> >>> To get back on topic, bash is the only Bourne-like shell that I >>> know that doesn't allow that function definition syntax above, >>> I've always wondered why.

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Stephane CHAZELAS
2009-10-28 09:00:59 -0400, Chet Ramey: > > zle-line-init() zle overwrite-mode > > zle -N zle-line-init > > > > To get back on topic, bash is the only Bourne-like shell that I > > know that doesn't allow that function definition syntax above, > > I've always wondered why. > > The Posix grammar has

Re: [OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Chet Ramey
> zle-line-init() zle overwrite-mode > zle -N zle-line-init > > To get back on topic, bash is the only Bourne-like shell that I > know that doesn't allow that function definition syntax above, > I've always wondered why. The Posix grammar has never allowed it (a `function_body' must be a compound

[OT] Re: how to start in "overwrite-mode"

2009-10-28 Thread Stephane CHAZELAS
2009-10-27, 16:29(-04), Jim Lawson: [...] > I have a user we're trying to encourage to migrate from tcsh to bash, > who is used to his shell starting up in overwrite mode (as opposed to > the default Insert mode.) > > Long story short, while I can easily bind a key to the "overwrite-mode" > readlin

how to start in "overwrite-mode"

2009-10-27 Thread Jim Lawson
Hi bug-bash, I have a user we're trying to encourage to migrate from tcsh to bash, who is used to his shell starting up in overwrite mode (as opposed to the default Insert mode.) Long story short, while I can easily bind a key to the "overwrite-mode" readline function, I can't figure out how to m