1

I have set a good ksh environement on old unix

PATH=$PATH:/usr/lib/acct:/usr/sbin:/sbin:/usr/ucb
export PATH
EDITOR=vi
FCEDIT=vi
export EDITOR
export FCEDIT
HOSTNAME=`uname -n`
HISTSIZE=500
LOGNAME=myname
TERM=386AT
PS1="\$LOGNAME@\$HOSTNAME:\$PWD\$ "
set -o emacs
stty 38400 intr ^C kill ^U tabs ixon ixoff ixany
setcolor white black 
alias type="whence -v"
alias __A=`echo "\020"`     # up arrow = ^p = back a command
alias __B=`echo "\016"`     # down arrow = ^n = down a command
alias __C=`echo "\006"`     # right arrow = ^f = forward a character
alias __D=`echo "\002"`     # left arrow = ^b = back a charactoe
alias __H=`echo "\001"`     # home = ^a = start of line
alias __Y=`echo "\005"`     # end = ^e = end of line

With this i have search history with arrows,etc,my question is: is possible to make an alias for ctrl+r search history?Old ksh support search history? I'm on unix svr4 ATT

  • Ctrl-R in emacs mode ought to just work. It is not an incremental character-by-character search like in bash. You have to type Ctrl-R, then the string you want to search for, then the enter key. If this doesn't work, please type Ctrl-V and tell us the version that it displays. – Mark Plotnick Apr 24 '15 at 16:49
  • It works,thanks add as answer so i can select as solution – elbarna Apr 24 '15 at 17:46
2

To search backward in your ksh command history, Ctrl-R in emacs mode ought to work, even if you're running an old version such as ksh88. It is not an incremental character-by-character search like in bash. You have to type Ctrl-R, then the string you want to search for, then Enter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.