Operating System - HP-UX
1851396 Members
3012 Online
104058 Solutions
New Discussion

Re: csh and viewing previous command

 
Krzysztof Grudzinski
Occasional Advisor

csh and viewing previous command

Hi,
Is is possible to enable viewing previous command like in "ksh" pressing ESC-k ?

I have EDITOR=vi and onyl the above feature deosn't work.

regards,
Chris
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: csh and viewing previous command

Hi Cris,

To use C shell (HP-UX) you need to do the following:

1. put the followings in you .cshrc file

# set the size of the command history
set history=50
# Saving command history between logins
set savehist=25

Use !! to execute previous command.

More info;
http://beta.experts-exchange.com/Operating_Systems/Unix/Q_20651807.html

Robert-Jan
T G Manikandan
Honored Contributor

Re: csh and viewing previous command

Krzysztof Grudzinski
Occasional Advisor

Re: csh and viewing previous command

Hi Robert,

I don't like to use !! for previous command execution. I am looking for possibility of usage ESC-k like it is in KSH.

thx,
Chris
T G Manikandan
Honored Contributor

Re: csh and viewing previous command

Chris,

Each shell has a different way of handling things as how it was customized/built.


The Esc-k usage for history is available for ksh.
For csh,you have to use the history variable.

T G Manikandan
Honored Contributor

Re: csh and viewing previous command

csh
!! for previous command
!n last n command