From: barrett@astro.cs.umass.edu (Daniel Barrett) Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.programmer,comp.sys.amiga.applications Subject: Some helpful WShell/FComp definitions -- enjoy Followup-To: comp.sys.amiga.applications Distribution: world Organization: BLAZEMONGER INCORPORATED I came up with some very useful WShell 2.0 definitions for command histories using FComp, in case anybody would like them. These go in your s:Config-FComp file. The first two are simple: move the cursor the beginning or the end of the line. I have these bound to control-A and control-E respectively, just like GNU Emacs keybindings. ; Move cursor to beginning of command line KEY 32 QUAL 8 NAME CTRL-A FMT "*E[19]*E[61]*E[61]" ; Move cursor to end of command line KEY 18 QUAL 8 NAME CTRL-E FMT "*E[61]" The next one I find extremely useful. It repeats the previous command you typed, but deletes the first word (the name of the program) and positions the cursor at the beginning of the line. Thus, it lets you conveniently run a program with the same arguments as the previous command. (It's bound to control-O for no particular reason.) ; Repeat the arguments of the previous command KEY 24 QUAL 8 NAME CTRL-O FMT "*E[16]*E[19]*E[61]*E[61]*E[75] *E[19]" UNIX csh users may recognize this as similar to the !* history command. The last one is similar to the previous one: it redisplays the LAST argument of the previous command (commonly a filename), and positions the cursor at the beginning of the line. I use this one all the time for listing a file and then performing a second operation on it (such as deleting it or editing it). (It's bound to control-Z for no particular reason.) ; Repeat only the last argument of the previous command KEY 49 QUAL 8 NAME CTRL-Z FMT "*E[16]*E[23]*E[53] *E[19]" UNIX csh users will recognize this as the !$ history command; ksh users will find it similar to the $_ variable. If anybody would like to share some more WShell/FComp definitions, I'll volunteer to collect them. Mail them to me and I'll post a summary. Have fun! Followups are to c.s.a.applications. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett -- Dept of Computer Science, Lederle Graduate Research Center | | University of Massachusetts, Amherst, MA 01003 -- barrett@cs.umass.edu | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////