Showing posts with label enable Arrow key for History commands. Show all posts
Showing posts with label enable Arrow key for History commands. Show all posts

Sunday, April 1, 2012

Linx /Unix history command by Arrow key.

Few lines in .profile will make life easier of DBA on Unix platform.

edit below command in .profile.
-------
#  set Unix command prompt 
export PS1=`uname -n`@':$PWD :$ORACLE_SID $'
# To enable backspace. 
set -o emacs
stty erase ^?
#simple alias to make life easier & save 5 second each time you login to sqlplus  
alias ll='ls -lart'
alias lsd='ls -l | grep ^d'
alias home='cd $ORACLE_HOME'
alias psora='ps -ef | grep pmon'
alias orasql='sqlplus / as sysdba'

##### To enable Arrow key for History commands 

alias __A=$(print '\0020') # ^P = up = previous command
alias __B=$(print '\0016') # ^N = down = next command
alias __C=$(print '\0006') # ^F = right = forward a character
alias __D=$(print '\0002') # ^B = left = back a character
alias __H=$(print '\0001') # ^A = home = beginning of line
export COLUMNS=130
clear