home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.hypersurf.com
/
ftp.hypersurf.com.tar
/
ftp.hypersurf.com
/
pub
/
users
/
r
/
rstone
/
ksh_pfkeys
Wrap
Text File
|
1996-08-20
|
2KB
|
82 lines
set -o ignoreeof
set -o emacs
alias __H='' # home key -
alias __A='' # up arrow - previous command
alias __B='' # down arrow - next command
alias __C='' # right arrow - move cursor right
alias __D='' # left arrow - move cursor left
alias __P='' # delete key - delete character
alias __0='\0'
alias __1='\1'
alias __2='\2'
alias __3='\3'
alias __4='\4'
alias __5='\5'
alias __6='\6'
alias __7='\7'
alias __8='\8'
alias __9='\9'
pfx='#pf
'
alias __q="$pfx" # aixterm
alias __z="$pfx" # xterm -sf
if [[ "power" = "$(arch)" ]]; then
alias __~="$pfx" # xterm +sf
fi
#
# aixterm pfkey definitions
# 001-012
# 013-024 (shift)
# 025-036 (ctl)
# 037-048 (alt)
alias pf001='#'
alias pf002='#'
alias pf003='#'
alias pf004='#'
alias pf005='#'
alias pf006='#'
alias pf007='#'
alias pf008='fc -e - -2'
# pf009 function
alias pf010='#'
alias pf011='#'
alias pf012="clear"
#
# xterm -sf pfkey definitions
# 224-233, 192, 193
alias pf193=$(whence pf012) # pf12
alias pf235=$(whence pf012) # pf12 for sun
#
# xterm +sf pfkey definitions
# 11-15, 17-21, 23, 24
alias pf24=$(whence pf012) # pf12
#
# query pfkeys
#
alias qpf='alias | grep ^pf'
#
# "whence" pfkey function, uses command line as argument
function pf009 {
line=$(fc -nl -1 -1 | sed -n 's/^ #//p') # strip leading tab & # character
if [[ -n "$line" ]]; then # anything there?
set $line # parse
y=$(whence -v $1)
x=$(whence $1)
if [[ "$y" != "${y%${x}}" ]]; then
line=${x}$(fc -nl -1 -1 | sed -e 's/^ #[^ ]*//')
fi
print -s "#$line"
print -s "pf009" # place holder, use command name
whence -v $1
fi
}