zsh-users
 help / color / mirror / code / Atom feed
From: Mike Hernandez <sequethin@gmail.com>
To: Zsh users list <zsh-users@sunsite.dk>
Subject: Re: fastest way to bring up a shell function for editing?
Date: Tue, 7 Feb 2006 10:24:26 -0500	[thread overview]
Message-ID: <20060207152426.GE16047@dementia.beyondnormal.net> (raw)
In-Reply-To: <EXCHANGE03dU2yjwD740000a89d@exchange03.csr.com>

On  Tue, Feb 07, 2006 at 02:56:11PM +0000, Peter Stephenson wrote:
> Mike Hernandez wrote:
> > Try this:
> > 
> > % foo(){ echo "this is a function" }
> > % foo
> > this is a function
> > % vared foo()
> > function> echo "vared works... sort of"
> > % foo
> > vared works... sort of
> 
> Err, actually what you're doing there is defining two functions, one
> called vared and one called foo, with the same body.  The function>
> prompt is the usual continuation prompt.  You'd get it just the same if
> the first line were:
> % foo() {
> 
> Of course, in a case like this you can simply up-arrow and edit the
> foo()... a few lines before.
> 
> Clint's answer is the most useful... the function zed supplied with the
> shell does this.  Remember to autoload it.  Pedantically,
> 
> autoload -Uz zed
> zed -f foo
> 
> Hit ^J when you're finished (or ^X^W if your terminal is weird).
> 

I knew if I said something silly like that, that I'd end up learning
something in the end :)

Mike


  parent reply	other threads:[~2006-02-07 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-07 14:36 Jean-Rene David
2006-02-07 14:38 ` Clint Adams
2006-02-07 14:46 ` Mike Hernandez
2006-02-07 14:56   ` Peter Stephenson
2006-02-07 15:17     ` Jean-Rene David
2006-02-07 15:24     ` Mike Hernandez [this message]
2006-03-02 21:04 ` Julius Plenz
2006-03-03  2:35   ` Jean-Rene David
2006-03-03  4:11     ` Dan Nelson

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=20060207152426.GE16047@dementia.beyondnormal.net \
    --to=sequethin@gmail.com \
    --cc=zsh-users@sunsite.dk \
    /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).