Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for aliased commands does not work
- X-seq: zsh-users 22057
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: completion for aliased commands does not work
- Date: Mon, 31 Oct 2016 16:33:37 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=46x93Mu/T66DAyvqnpPARJWNnOsDwt7WEqKX3AGVpT8=; b=cw3NWWY2HKHYJQSmzF8WerYzTUyNMYMbY+ZXgcUdcTWvM0mcqPySrOPV1yjDgghLgq /RUo0yISxEVD79v3deD8xvNlxtRQtKLvNcnJ17ZMEak9cLIyvkzZxpWrAs/V7hwnSONv d51ukIZE+D6vCMRaDZJ77oZ9mPPdiS6yOcHSgQSC2dmm07vc57YsHywZH9qckKgQ8cas Ant77BMObIv6CVii1cdN0UAJnbywxrSSRt6nQft3+rAYN3pmKVA+wPaY3FrfQ3CuuSux zSZ8jSRqptkmg1fcpHgRntHKXX3hJKm7w7yhcvAZX2Zu5v3I1sgIJzqL1SW2lthbOJew 9YKA==
- In-reply-to: <20161031231212.GA7144@fujitsu.shahaf.local2>
- 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: <5817C9F9.2010809__36345.4683371403$1477954133$gmane$org@gmx.ch> <20161031231212.GA7144@fujitsu.shahaf.local2>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author