The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Is there any way to make up arrow show last command in CSh? sayeo Shell Programming and Scripting 5 03-22-2008 07:33 AM
i am not able to recall the command typed earlier in unix murli1200 UNIX for Advanced & Expert Users 1 08-24-2006 11:52 AM
DARPA contestants make robotic history Neo News, Links, Events and Announcements 3 10-10-2005 07:33 AM
Command history a25khan UNIX for Dummies Questions & Answers 8 12-10-2003 02:05 AM
command history vikasdeshmukh UNIX for Dummies Questions & Answers 3 11-14-2001 01:37 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2005
Registered User
 

Join Date: Feb 2005
Posts: 136
ksh: how to make [up arrow] recall command history

I want to get my up arrow key to recall my previous commands in Korn shell.
Anyone help please?

thanks a bunch!

BG
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-14-2005
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,502
add the following
lines to the bottom of your .kshrc file in your $HOME directory:

set -o emacs
alias __A=$(print '\0020') # ^P = up = previous command
alias __B=$(print '\0016') # ^N = down = next command
alias __C=$(print '\0006') # ^F = right = forward a character
alias __D=$(print '\0002') # ^B = left = back a character
alias __H=$(print '\0001') # ^A = home = beginning of line
Reply With Quote
  #3 (permalink)  
Old 03-15-2005
Registered User
 

Join Date: Feb 2005
Posts: 136
I like vi as my editor.

can i do this with vi?
Reply With Quote
  #4 (permalink)  
Old 03-15-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
This doesn't change your editor, it puts ksh into emacs mode. And no you can't do this with ksh in vi mode.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:46 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0