Operating System - HP-UX
1827584 Members
2829 Online
109965 Solutions
New Discussion

Re: can not recall the command user vi editor

 
SOLVED
Go to solution
Junghun
Occasional Advisor

can not recall the command user vi editor

HI
when i want to recall the commands that i printed before using "j"and"k" button,it can not work.i have checked the $EDITOR and it is already set to vi.i also have tried to user "#set -o vi"to set it manualy.but it do not work either.
other vi commands work perfectly.
my os version and the env display is like this:
#######################################
seslback [/]# uname -a
HP-UX seslback B.11.11 U 9000/800 1804239553 unlimited-user license
seslback [/]# env
_=/usr/bin/env
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/usr/dt/share/man:/opt/samba/man:/opt/samba/WTEC_Support_Tools/man:/opt/resmon/share/man/%L:/opt/resmon/share/man:/opt/gnome/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/perl/man:/opt/ssh/share/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/graphics/common/man:/opt/networker/man
PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/resmon/bin:/opt/gnome/bin:/opt/ignite/bin:/opt/mozilla:/opt/wbem/bin:/opt/wbem/sbin:/opt/hpsmh/bin:/opt/perl/bin:/opt/ssh/bin:/opt/gwlm/bin:/usr/sbin/diag/contrib:/opt/graphics/common/bin:/opt/networker/bin:/sbin:/home/root
COLUMNS=132
EDITOR=vi
LOGNAME=root
MAIL=/var/mail/root
ERASE=^H
PS1=seslback [$PWD]#
SHELL=/sbin/sh
HOME=/
TERM=vt100
PWD=/
TZ=EAT-8
LINES=49
################################
what happened and what to do?
TKS
Best Regards
--J
4 REPLIES 4
Ralph Grothe
Honored Contributor

Re: can not recall the command user vi editor

try setting env HISTFILE (probably in your .profile)
e.g.

export HISTFILE=$HOME/.sh_history

Madness, thy name is system administration
Enrico P.
Honored Contributor
Solution

Re: can not recall the command user vi editor

Hi,
did you have create the history file?

touch $HOME/.sh_history

and insert the line

export HISTFILE=$HOME/.sh_history

in the user .profile

Then exit and login. The history file record the command you run.

Enrico
Ludovic Derlyn
Esteemed Contributor

Re: can not recall the command user vi editor

hi,

your .profile it is ok ?

(EDITOR=vi
export EDITOR
HISTFILE=.sh_history
export HISTFILE )

regards

L-DERLYN
Junghun
Occasional Advisor

Re: can not recall the command user vi editor

HI
thanks for your answers!the problem is solved!
-J