Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Change interactive command into a comment
- X-seq: zsh-users 24439
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxx>
- Subject: Re: Change interactive command into a comment
- Date: Thu, 14 Nov 2019 23:21:57 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1573770112; bh=hioUpyzPnCaHIG4hSQ1uyab3aSlTiWTAnMr6plPK4QI=; h=From:References:To:Subject:Date:From:Subject; b=lC5eLbUnvy87wFeIah3LHiHh6KsK4cmf6oLZgxA2t1Rh+kClU5GzBqbsEZgjOZDhHYBzzz4MgfomdewmYrwkC/RwsP3Efr0vJCIUQ9Wxh4+U3XV5+FX6qZwoUUlpRZrnWuOFOTTITFI8ckeaRVrK/QTdmn6a41xrHBbhd6bUych1beL0AKk5YuZyNTatVHe1dnFMD2pXb0lDSNlZR/xEm8mZ1znAeGQSGTvymERGTqrFD2em4/7kLkMDQkf08iRvEhTxyGHol7sOTgp+uHuq2VX4g8BM/d1sXTCX3Cgg9qKB8GjHuJcZqlhITGEk94V+ksnFI19iHDl9gELIQGCL+A==
- In-reply-to: <20191114044120.GA7796@danh.dev>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <AE14DF7F-5C34-4D14-A20A-8356C547E114@easesoftware.com> <20191114044120.GA7796@danh.dev>
Danh Doan wrote:
> With this piece of code in your zshrc, you could press C-x C-h to
> commit your current command to history without executing it.
Another option which covers roughly the same basic use case is the
builtin push-input widget. Rather than use the history, the current
buffer is pushed onto a separate stack and automatically popped
on the next start of the line editor.
There's also push-line and push-line-or-edit which have different
behaviour from secondary (PS2) prompts.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author