Korn shell emulation of Csh's !? ???

DaviD W. Sanderson dws at margay.cs.wisc.edu
Tue Jan 29 12:54:25 AEST 1991


In article <16554 at ogicse.ogi.edu> morgan at ogicse.cse.ogi.edu (Clark O. Morgan) writes:
>I've recently switched over to Korn shell from Csh and am quite happy.
>However, I dearly miss the Csh !? history recall feature (which permits
>commands to be recalled by "words" anywhere in a command string, not
>just at the beginning of the command).

You can put arbitrary words from your previous command into the current
command with the underscore command in vi mode.  The man page says:

	[count]_	Causes the count word of the previous command
			to be appended and input mode entered.  The
			last word is used if count is omitted.

So to recall the second word of the previous command, you can say

	<ESC>2_

and continue typing.
-- 
       ___
      / __\  U N S H I N E	           DaviD W. Sanderson
     |  |  | I N E			    dws at cs.wisc.edu
_____|  |  |_____  ________
\      / \   |__/ /////__	Fusion Powered Locomotives Made to Order
 \____/   \__|_/  \\\\\______	 (TARDIS model available at extra cost)



More information about the Comp.unix.shell mailing list