From: Christian Taylor <cht@chello.at>
To: "zsh-users" <zsh-users@sunsite.dk>
Subject: Re: Simple Tip of the Day
Date: Sat, 29 Oct 2005 16:52:30 +0200 [thread overview]
Message-ID: <200510291652.30264.cht@chello.at> (raw)
In-Reply-To: <200510291637.58926.kos@supportwizard.com>
Konstantin Sobolev wrote:
> On Friday 28 October 2005 15:47, Hannu Koivisto wrote:
> > bindkey -s '^[[5~' 'cds\r' # "PageUp"
> >
> > Just in case you are wondering what that 'cds' is, it is an
> > interactive way to select a directory from the directory
> > stack-treated-as-history, along the lines of a similar feature in
> > 4nt:
> >
[...]
>
> I'm using menu completion for this:
>
> bindkey "^Z" "menu-complete"
> bindkey -s '\ec' 'cd -^Z'
I'm using something very similar:
zle -N select-from-cd-stack
select-from-cd-stack() {
LBUFFER=$LBUFFER"~+"
zle menu-complete
if [[ ${LBUFFER[-2,-1]} = "~+" ]]; then
LBUFFER=${LBUFFER[1,-3]}
fi
}
bindkey '\ed' select-from-cd-stack
The advantage is that I can also use it for other commands like cp (for
example when I want to copy a file from a directory in the stack to the
current one). And since I have setopt auto_cd, I can instantly jump to
directories in the stack.
Another (default) binding that I really like is:
bindkey "^[h" run-help
Christian
next prev parent reply other threads:[~2005-10-29 14:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 11:11 zzapper
2005-10-28 11:32 ` Jean Chalard
2005-10-28 15:25 ` Bart Schaefer
2005-10-28 17:40 ` Jean Chalard
2005-10-28 15:53 ` zzapper
2005-10-28 11:47 ` Hannu Koivisto
2005-10-28 12:26 ` Nikolai Weibull
2005-10-29 12:37 ` Konstantin Sobolev
2005-10-29 14:52 ` Christian Taylor [this message]
2005-11-01 16:55 ` run-help and \cmd (was: Simple Tip of the Day) Vincent Lefevre
2005-11-01 18:02 ` Peter Stephenson
2005-11-01 18:23 ` Peter Stephenson
2005-11-01 18:55 ` Vincent Lefevre
2005-10-28 20:08 ` Simple Tip of the Day DervishD
2005-10-30 5:10 ` Philippe Troin
2005-11-01 16:58 ` Vincent Lefevre
2005-11-30 20:32 Simple Tip of The Day zzapper
2005-11-30 23:27 ` Przemyslaw Gawronski
2005-12-01 20:38 Simple Tip of the Day zzapper
2005-12-02 1:09 ` Vincent Lefevre
2005-12-02 9:13 ` Thorsten Kampe
2005-12-02 12:49 ` Mikael Magnusson
2005-12-02 19:20 ` zzapper
2005-12-03 20:28 ` zzapper
2005-12-03 22:08 ` Mikael Magnusson
2005-12-03 22:20 ` zzapper
2005-12-04 1:32 ` Mikael Magnusson
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=200510291652.30264.cht@chello.at \
--to=cht@chello.at \
--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).