LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2009, 02:45 PM   #1
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Jessie
Posts: 769

Rep: Reputation: 74
ksh on Linux: how to fix Home, End and Delete keys?


Has anyone here ever found out how to fix the behavior of the Home, End and Delete keys in the Korn shell on Linux? All solutions I can find on Google are for BSD systems and require some 'bind' or 'keybind' command, which I don't have and don't seem to be available in the repositories.

TIA
 
Old 06-17-2009, 03:24 PM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
After switching, a few months ago, to OpenBSD (which uses ksh as its primary shell) I just got used to using the "factory defaults" of Ctrl-A for Home and Ctrl-E for End. The only downside to this is if you are using screen, as it uses Ctrl-A as its action listener.

However, if you are looking for a bind/keybind command, it will not be in a repository, it will be a shell built-in command.

Look at the man page for ksh/pdksh - whichever you are using - and search (by pressing the "/" key), type in "bind" or "keybind" without the quotes, press Enter and you can skip to the next match in the document by pressing "n".
 
Old 06-17-2009, 08:05 PM   #3
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Jessie
Posts: 769

Original Poster
Rep: Reputation: 74
I know how to navigate man, TYVM. I considered the possibility of bind/keybind being builtins and tried the suggestions I found on Google anyway. They didn't work. Korn says there is no such file or command.

I hate Ctrl+a and Ctrl+e. Hate it.
 
Old 06-17-2009, 08:23 PM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,193

Rep: Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388Reputation: 1388
Quote:
Originally Posted by http://kornshell.com/doc/faq.html
Q5. What are the major new features of KornShell 1993?
A5. The only major new interactive feature is key binding.
...
I guess you don't have ksh93?

Quote:
The only downside to this is if you are using screen, as it uses Ctrl-A as its action listener.
Screen lets you rebind this, I use Ctrl-^ (only thing Emacs doesn't use).
 
Old 06-17-2009, 09:33 PM   #5
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Jessie
Posts: 769

Original Poster
Rep: Reputation: 74
version sh (AT&T Research) 1993-12-28 s+
 
Old 06-18-2009, 08:28 AM   #6
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
Oh - I found this; I hope it helps you. http://www.kornshell.com/examples/keybind
 
Old 06-18-2009, 02:35 PM   #7
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Jessie
Posts: 769

Original Poster
Rep: Reputation: 74
Yes, I had seen that one. It worked for Home and Delete, but not for End. Go figure.

I uninstalled the original ksh93 and installed mksh. It's supposed to be "incomplete" compared with ksh93, but I still haven't found what exactly it doesn't support. I know it has all the keys working fine, so I'm sticking with it for the time being.

Thanks.
 
Old 06-18-2009, 06:01 PM   #8
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,421

Rep: Reputation: 200Reputation: 200Reputation: 200
you could always use

set -o vi

like real men do

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Home / End keys in aterm Vgui Linux - General 4 08-11-2005 12:59 PM
Home/End keys don't work Abdul Linux - Software 2 07-25-2005 08:48 PM
ins,end,delete keys are mischevious lnxlover Linux - Software 2 03-05-2005 02:24 AM
home, delete, end keys problem in vi bujecas Slackware 10 01-12-2005 02:32 PM
Home and End keys in RXVT kevmccor Slackware 3 12-16-2004 04:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration