Use of function keys for common comands at the ksh prompt.

Bill Carpenter wjc at hos1cad.ATT.COM
Wed Feb 20 04:44:23 AEST 1991


mvadh> nope, you're SOL.  strings that begin with ^[ are either syntax
mvadh> errors or invalid alias names.

In general, yes.  However, in the [ge]macs mode of KSH, aliases
defined as underscore-letter are invoked by typing ESC-letter.  For
example,

	alias -x _z="ls -laF \`whence \`^B"

This is invoked as "ESC z".  (The ^B at the end, literally a cntl-B in
my $ENV file, positions the cursor inside the backquote.  Then I just
finish the command and hit return.)  There's no problem if you want to
include the newline at the end of the alias definition.  I have
several of these aliases already wired into the ROMs in my fingers.

Any escape sequences already in use for the [ge]macs mode editing will
have their hardwired meanings and not this kind of alias invocation.
-- 
  Bill Carpenter         att!hos1cad!wjc  or  attmail!bill



More information about the Comp.unix.shell mailing list