Subject: Re: brace expansion and ksh?
To: None <netbsd-help@NetBSD.org>
From: George Georgalis <george@galis.org>
List: netbsd-help
Date: 10/22/2007 10:36:31
On Mon, Oct 22, 2007 at 01:15:29AM -0400, George Georgalis wrote:
>On Sun, Oct 21, 2007 at 07:15:53PM -0400, James K. Lowden wrote:
>>George Georgalis wrote:
>>> (if someone knows how to make the home/end keys work from mac
>>> xterm, that would be a big help)
>>
>>What does "work" mean?  When I press Fn + Left Arrow, the cursor goes to
>>the beginning of the line....
>>
>>	$ echo $SHELL
>>	/bin/bash
>
>That is not on NetBSD? I was quite happy with bash
>till I found zsh. That lasted till I found the
>NetBSD port of ksh, which is very good.
>
>In bash I used the following .inputrc so PC keyboard
>keys (home/end) worked in both console and xterm:
>
># see 'bind' in bash(1)
># make the home and end keys work in xterm
>"\e[H": beginning-of-line
>"\e[F": end-of-line
># make the home and end keys work in console
>"\e[1~": beginning-of-line
>"\e[4~": end-of-line
>
>oh, whooho, I got it. with these lines sourced from
>a file or in .profile (you cannot enter the esc char
>in a ksh shell), that's an esc char followed by two
>normal characters.
>
>bind '^[[H'=beginning-of-line
>bind '^[[F'=end-of-line
>
>bonus, the bindings work directly in a screen(1) session.

Dang, no need for literal escape codes in .profile
the plain ascii caret notation below works...

 bind '^XH'=beginning-of-line                                                                                    
 bind '^XF'=end-of-line

I did read the man page and try to set this up, way
before, but for some reason, at that time, never got
it right. Is there any reason these aren't bound by
default?

// George


-- 
George Georgalis, information system scientist <IXOYE><