zsh-users
 help / color / mirror / code / Atom feed
* ...missing one bash-feature
@ 2011-10-13  4:50 meino.cramer
  2011-10-13  8:28 ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: meino.cramer @ 2011-10-13  4:50 UTC (permalink / raw)
  To: zsh-users

Hi,

there is one feature of the bash which I miss in zsh -- may be 
by not knowing it.

Suppose in bash I do the following:
bash> ls onefile.txt twofile.txt threefile.txt
bash> rm _____

instead of '_____' I press instead

ALT - 2 ALT .

and get the 'last - 2' argument of the previous command, which is
'onefile.txt'

Is there a way to mimic or simulate the same behaviour in zsh or is
there a even better and even more intuitive way to do so?

Thank you very much in advance for any help!
Best regards,
mcc






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ...missing one bash-feature
  2011-10-13  4:50 ...missing one bash-feature meino.cramer
@ 2011-10-13  8:28 ` Mikael Magnusson
  2011-10-16  1:16   ` Ivan Sichmann Freitas
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2011-10-13  8:28 UTC (permalink / raw)
  To: meino.cramer; +Cc: zsh-users

On 13 October 2011 06:50,  <meino.cramer@gmx.de> wrote:
> Hi,
>
> there is one feature of the bash which I miss in zsh -- may be
> by not knowing it.
>
> Suppose in bash I do the following:
> bash> ls onefile.txt twofile.txt threefile.txt
> bash> rm _____
>
> instead of '_____' I press instead
>
> ALT - 2 ALT .
>
> and get the 'last - 2' argument of the previous command, which is
> 'onefile.txt'
>
> Is there a way to mimic or simulate the same behaviour in zsh or is
> there a even better and even more intuitive way to do so?
>
> Thank you very much in advance for any help!

This is in zsh by default unless you're using vi keybindings. If
you're not doing that on purpose, add bindkey -e to your .zshrc.

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ...missing one bash-feature
  2011-10-13  8:28 ` Mikael Magnusson
@ 2011-10-16  1:16   ` Ivan Sichmann Freitas
  0 siblings, 0 replies; 3+ messages in thread
From: Ivan Sichmann Freitas @ 2011-10-16  1:16 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

> This is in zsh by default unless you're using vi keybindings. If
> you're not doing that on purpose, add bindkey -e to your .zshrc.

Or, if you're using vi keybindings, just add to your .zshrc:
bindkey -M viins '\e.' insert-last-word

-- 
Ivan Sichmann Freitas
GNU/Linux user #509059

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-16  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13  4:50 ...missing one bash-feature meino.cramer
2011-10-13  8:28 ` Mikael Magnusson
2011-10-16  1:16   ` Ivan Sichmann Freitas

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).