Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: "Alt ." to repeat last part of a command
- X-seq: zsh-users 15020
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: Carlo Trimarchi <mr.spoon21@xxxxxxxxx>
- Subject: Re: "Alt ." to repeat last part of a command
- Date: Fri, 23 Apr 2010 11:34:56 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=zssdm64iUHCxKNLOrfaNrV1pqe9HY7Opdxj3q/qIx/c=; b=A++nLUfWjkspzrd6Es/lgNyzBzlqNPoisU22a30reotY2K4NK1Q2FmhYSMnU+fNBSN /Fy+G5uRFevN96a2QjHDViDgKEQzLG+MBZu+cUgYmQlTQUB6nbzTq6LVCNKLwlQ3ypKC FBKWvHdJpZRdKTwEEbb2fA7mmBqzweopzRYFQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=oOgYYHYB5MFy+b3AXEshFgEKSe4a1b4WxKMEx2li6cFzznHcqaAEfUApaXgzI9Vn/8 PJo9/ZeXNQESdkpPpE2AUbJGBQScrPbtiAUdpuIv+8jFtWZ/tNRdfQbTrbCP+0CeAcyI O1VC1oS+6+l5bbJ2w5n0VkWq7SYALpJEKyZWE=
- In-reply-to: <g2i19e866461004230224lfeda6311y1b490accd0442321@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <g2r8f67b6f81004230214j86a58e34r974261cb88ea1250@xxxxxxxxxxxxxx> <g2i19e866461004230224lfeda6311y1b490accd0442321@xxxxxxxxxxxxxx>
2010/4/23 Jérémie Roquet <arkanosis@xxxxxxxxx>:
> 2010/4/23 Carlo Trimarchi <mr.spoon21@xxxxxxxxx>:
>> how can I use the "Alt ." combination to repeat the last part of a
>> command? When I used bash I used a lot this.
>> Or, maybe, is there any other combination in zsh to do the same thing?
>
> Not sure I understood what you mean, but maybe :
>
> bindkey -s '^[.' '!#$'
Or
bindkey -s '^[.' '!$'
if you want the last part of the /previous/ command
function last-arg()
{
LBUFFER+=' !$'
zle complete-word
}
zle -N last-arg
bindkey '^[.' last-arg
not to have to press <space> and <tab>
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author