zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-users@zsh.org
Subject: Re: completer that first expands global aliases  (Re: dsf)
Date: Tue, 08 Jan 2013 09:58:37 +0000	[thread overview]
Message-ID: <20130108095837.581a79c3@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <kcgpl3$dec$1@ger.gmane.org>

On Tue, 08 Jan 2013 09:41:55 +0000 (UTC)
Daniel <quite@hack.org> wrote:
> On 2013-01-07, Daniel <quite@hack.org> wrote:
> > I have a nice little recent-files completer, see below.
> > (found here:
> > http://michael.stapelberg.de/Artikel/zsh_recent_completion )
> >
> > What I would like to add to this, is for it to expand global
> > aliases inline, before trying to complete (and thus ending up
> > completing files in my aliased directory).
> >
> > I started trying to meld _generic and _expand_alias, but with my
> > lack of fluency in zsh, I just made a mess :) Any help out there?
> > Is there perhaps some generic way for having this done for all
> > completion? A zstyle for _main_complete?

I can't see a straightforward way of doing this; it looks like it needs
some complicated rewriting of _expand_alias into some other function, as
you were trying.

It might be possible to rig up something at a higher level (probably ZLE
widgets rather than completion) to call _expand_alias, ensuring it
accepts the result with all expansions, then call the generic completion
you want, but I haven't thought that through.

pws


  reply	other threads:[~2013-01-08 10:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 10:01 dsf Daniel
2013-01-08  9:41 ` completer that first expands global aliases (Re: dsf) Daniel
2013-01-08  9:58   ` Peter Stephenson [this message]
2013-01-08 13:06   ` Oliver Kiddle
2013-01-08 17:01     ` Daniel
2013-01-08 18:24       ` Bart Schaefer
2013-01-08 21:29         ` Daniel
2013-01-09  4:40           ` Bart Schaefer
2013-01-09  7:29             ` Daniel
2013-01-09 16:05               ` Bart Schaefer

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=20130108095837.581a79c3@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /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).