zsh-users
 help / color / mirror / code / Atom feed
From: zzapper <david@tvis.co.uk>
To: zsh-users@sunsite.dk
Subject: Re: Refereing to elements in current command line
Date: Fri, 8 Sep 2006 17:05:54 +0000 (UTC)	[thread overview]
Message-ID: <Xns9838B81E2B94Ezzappergmailcom@80.91.229.5> (raw)
In-Reply-To: <450198AD.1070104@bigasterisk.com>

Drew Perttula <drewp@bigasterisk.com> wrote in news:450198AD.1070104
@bigasterisk.com:

> 
>    cp fredjoesid.php !#$:s/fred/dan
> 
> then tab to check that the last argument expands the way you want
> 
Drew,
Yep that's what I was looking for

Summary AFAICT

For CURRENT line (the # designates current line)

!#:0    command
!#^     first parameter
!#:1    first parameter
!#:1-4  first 4 parameters
!#$     last parameter
!#*     all parameters
!#$:s/bash/zsh

For Previous Command (for comparison)
!!      repeat
!:0     command
!^      first parameter
!:1     first parameter
!:1-4  first 4 parameters
!$      last parameter
!*      all parameters
!!:s/bash/zsh

For last but one command
!-2:2   second parameter of second but last command


-- 
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips


      reply	other threads:[~2006-09-08 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-08 10:12 zzapper
2006-09-08 11:07 ` Frank Terbeck
2006-09-08 16:22 ` Drew Perttula
2006-09-08 17:05   ` zzapper [this message]

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=Xns9838B81E2B94Ezzappergmailcom@80.91.229.5 \
    --to=david@tvis.co.uk \
    --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).