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

Re: OT: Getting MySQL fields with embedded spaces into array

2009-10-28 Thread Greg Wooledge
On Wed, Oct 28, 2009 at 06:04:00AM -0400, Gerard wrote: > COM_LINE="-u${SQL_USER} -p${SQL_PASSWORD} -h ${HOST} ${NO_COLUMN_NAME}" > table=MyTable > DECLARE_STATEMENTS=($(mysql ${COM_LINE} -i -e"use ${DB}; SELECT defaults FROM > "${table}" WHERE 1;")) You're populating an array with each word (not

OT: Getting MySQL fields with embedded spaces into array

2009-10-28 Thread Gerard
I apologize for asking this here; however, I cannot seem to locate an answer anywhere else. I am writing a script that will use MySQL for a back end. I access MySQL and store the results in arrays like this: //snippet// database: MyDataBase table: MyTable field: defaults Now, I have populated t

[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