zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: completion for aliased commands does not work
Date: Tue, 1 Nov 2016 06:29:03 +0100	[thread overview]
Message-ID: <CAHYJk3ScU7RMao=8-Y7bD_pfsoQOygMCaxqJ63v-rB6hqs9xtQ@mail.gmail.com> (raw)
In-Reply-To: <161031163337.ZM21662@torch.brasslantern.com>

On Tue, Nov 1, 2016 at 12:33 AM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Oct 31, 11:12pm, Daniel Shahaf wrote:
> } Subject: Re: completion for aliased commands does not work
> }
> } Fourhundred Thecat wrote on Mon, Oct 31, 2016 at 23:47:21 +0100:
> } >   alias diff='colordiff'
> } >   diff --<TAB>
> } >   /usr/bin/diff --<TAB>
> }
> } Completion "sees through" aliases.  You'll find that with the above
> } alias, "diff <TAB>" and "colordiff <TAB>" behave the same way.
>
> That's actually not true.  You have to "setopt complete_aliases" for
> completion to "see through".  If for some reason you do not want to
> set that, THEN:
>
> } Therefore, define a completion for colordiff:
> }
> }     compdef colordiff=diff
>

That's actually not true, setting complete_aliases makes completion
treat aliases as separate commands. :)

-- 
Mikael Magnusson


  reply	other threads:[~2016-11-01  5:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5817C9F9.2010809__36345.4683371403$1477954133$gmane$org@gmx.ch>
2016-10-31 23:12 ` Daniel Shahaf
2016-10-31 23:33   ` Bart Schaefer
2016-11-01  5:29     ` Mikael Magnusson [this message]
2016-11-01 18:53       ` Bart Schaefer
2016-10-31 22:47 Fourhundred Thecat

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='CAHYJk3ScU7RMao=8-Y7bD_pfsoQOygMCaxqJ63v-rB6hqs9xtQ@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.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).