zsh-users
 help / color / mirror / code / Atom feed
From: "Barton E. Schaefer" <schaefer@z-code.com>
To: zsh-users@math.gatech.edu (Zsh users list)
Subject: Re: how to get standard output used in command line editor?
Date: Thu, 29 Jun 1995 11:07:33 -0700	[thread overview]
Message-ID: <9506291107.ZM17946@zyrcon.z-code.com> (raw)
In-Reply-To: P.Stephenson@swansea.ac.uk "Re: how to get standard output used in command line editor?" (Jun 29,  5:33pm)

On Jun 29,  5:33pm, P.Stephenson@swansea.ac.uk wrote:
} Subject: Re: how to get standard output used in command line editor?
}
} unpingco@ece.ucsd.edu wrote:
} > 
} > Is there a way to use fc to edit the list generated by the find command
} > and then use the newly edited list as a command?
} 
} If you need an external editor, it doesn't look like fc will help

If you know in advance that you're going to want to do this, invoke
fc *first*, then run the "find" or whatever from inside your editor to
capture the output, and edit it into commands as you will.

You can even do this afterwards if you're willing to wait for the "find"
to run again.

Or you can do this:

    FINDOUT=/usr/tmp/find.$$
    find() {
	command find $* | tee $FINDOUT
    }

Then every time you run "find" the output gets captured for you, and you
can "vi $FINDOUT" or whatever to edit it into commands.

If you don't anticipate running finds that generate megabytes of output,
you can use:

    find() {
	FIND="$(command find $*)"
	echo "$FIND"
    }

Then "vared FIND" works, etc.

-- 
Bart Schaefer                     Vice President, Technology, Z-Code Software
schaefer@z-code.com                  Division of NCD Software Corporation
http://www.well.com/www/barts


  reply	other threads:[~1995-06-29 19:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-06-29 15:58 Jose Unpingco
1995-06-29 16:33 ` P.Stephenson
1995-06-29 18:07   ` Barton E. Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-06-29 15:55 Jose Unpingco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9506291107.ZM17946@zyrcon.z-code.com \
    --to=schaefer@z-code.com \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).