Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 May 2001 01:00:19 -0400
From:      parv <parv_@yahoo.com>
To:        f-q <freebsd-questions@freebsd.org>
Subject:   Re: ksh93: different emacs mode behaviour in xterm and console
Message-ID:  <20010503010019.A12774@moo.holy.cow>
In-Reply-To: <20010402071002.A1145@moo.holy.cow>; from parv_@yahoo.com on Mon, Apr 02, 2001 at 07:10:03AM -0400
References:  <20010402071002.A1145@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
so, me shared this in sometime in my lifetime...
> on plain old console (TERM=cons25):
> - before setting emacs mode:
>   M-h produces visible character 'h' instead of deleting current word
>   C-w works like M-h
> 
> - after setting emacs mode
>   M-h does not work as stated in man ksh(1); produces character 'h' 
>   C-w behaves like C-u (unix-line-discard, from man bash(1))
> 
> in a xterm (${TERM:0:5}=xterm):
> - before emacs mode:
>   M-h produces ^[h character
>   C-w works like M-h
> 
> - after emacs mode:
>   M-h works as stated in man ksh(1); 
>   C-w works like C-u
> 
> 
> also, i am not binding any keys, just relying on default behaviour;
> i wish i could use ksh93 in console too after setting emacs mode.
> 
> btw, am using FreeBSD 4.3-RC as of Mar 31 4.38a est 2001; ksh is 
> "ksh 93" (tried both from the ports and built from ast-open sources).
> 
> what could be the cause of M-h not working under/in console after setting 
> emacs mode? 

so a few days ago i logged on a sunOS/solaris 2.5[1] at work and
found only sh and ksh. after sending ksh thru' strings i see that its a 
88 version not 93...which got me curious to test "delete-last-word" key(s) 
... and i found that a particular combination (of meta[2], "alt", with w or 
h) works okay after some T&E (trial and error). (i will post it later 
today after i return from work.) ...that got me thinking about
the above problem. 

anyway ... the "problem" seem to be confusion/ignorance about just
which key(s) generate the "meta" key. in TERM=cons25, "esc, h" does
the "delete-last-word" properly... which also happen to work in
${TERM:0:5}=xterm properly. it's just that "alt+h" also works in
a xterm (clone). and, let the truth be told, i was expecting "alt"
to be treated as "meta" key in ksh in console and didn't even 
thought of using "esc"... guess i didn't read the man page carefully
at the time of the "problem", was too concentrated on description
of "M-h" -- which ... ummm ... clearly >gulp< states/implies that
"esc" generates the "meta" key...

sorry for the long confession style problem resolution ... i think
perlmonks.com's recent postings are getting to me.


[1] the sun os has various pieces of software containing references to both 
solaris and sunOS.

[2] i use teraterm to telnet to it on ultraSparc ii and teraterm has the
option to use meta key, unlike tvnt iirc

- parv

--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010503010019.A12774>