- 论坛徽章:
- 1
|
I have same problem!
如果你用的是KSH
root@SD /> ksh
# stty erase
# set o=vi
# whoami
root
# pwd
/
#
你可用set o=vi, 此行也可定義在.profile裡面, 然後你就可以使用ESC+K(往前), 或ESC+J(往後)切換使用過的指令.
你也可以用`history`或`fc -l` 列出之前敲過的指令
Re:請問有支援 shell history 功能的工具嗎?
Monday, January 10, 2005 2:04:07 PM 解決我全部的問題
--------------------------------------------------------------------------------
Hi :
The posix shell (/usr/bin/sh) is the default luser\'s login shell.
Set up the follows in ~/.profile
EDITOR=vi
export EDITOR
will let you access the command buffer by vi syntax, such as ESC k for last line, ESC j for next line.
More environment can control the command history file, such as
HISTFILE for name of command history file.
HISTSIZE for the size of history file.
For more detail, please reference man page by
$ man sh-posix |
|