Recall history in the middle of a "foreach" entry
Martin Kraemer
Martin.Kraemer at Fujitsu-Siemens.com
Thu Aug 10 16:10:23 EEST 2006
On Wed, Aug 02, 2006 at 08:34:33PM +0100, Russell Cook wrote:
> Can someone tell me if it is possible to recall the line that was entered at
> the "foreach?" prompt?
>
> I am able to recall previous commands, but the commands typed during the
> foreach input are not saved in the history. I am often using the foreach
> loop to check stuff on our network management server, and would be pleased
> if there was a way of recalling these commands.
Not after you've hit <RETURN>, but what I sometimes do:
% foreach f ( 1 2 3 )
> echo $f <= after you've typed this, hit ^A^K^Y <RETURN> to copy the line
> <= now hit ^Y to paste the previous line
echo $f <= now ready to edit and modify...
> end
Just my $.02
Martin
--
<Martin.Kraemer at Fujitsu-Siemens.com> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-48332 | 81730 Munich, Germany
More information about the Tcsh
mailing list