Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emulate a tsch Feature Using csh

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
US
Hello,

In one environment I maintain the users must use the c-shell but would like to still have one of the features of the t-shell where as using the up and down arrows cycle through the history of commands.

Not sure where to start. Maybe a script in there path where the script file name = the arrow key somehow??? [ponder]

What can you recommend?

Thanks,

Michael42
 
You can do it in ksh, try this:
(Copied from
Use this tip to enable your arrow keys.
Caveat: You will have to use the emacs bindings

Enjoy!

#!/bin/csh
# file: enable-arrow
# source in current environment with
# command:
# . enable-arrows
#

set -o emacs

# Note: these are the actual control
# characters. In vi, type i ctrl-v
# then ctrl-P (if u want a ctrl-p)
alias _A=^P
alias _B=^N
alias _D=^B
alias _C=^F

alias __A=^P
alias __B=^N
alias __D=^B
alias __C=^F


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top