Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`)
- X-seq: zsh-users 22396
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`)
- Date: Tue, 17 Jan 2017 09:43:42 +0000
- Cms-type: 201P
- In-reply-to: <CAM4j=kPadHx6_w6AzvZJXVxJ6_Gg5oE0=OUD2-Dv1wzANufxyw@mail.gmail.com>
- 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
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170117073841epcas5p38b85960fdaef1834021ddeaa71738b56@epcas5p3.samsung.com> <CAM4j=kPadHx6_w6AzvZJXVxJ6_Gg5oE0=OUD2-Dv1wzANufxyw@mail.gmail.com>
On Mon, 16 Jan 2017 23:15:33 -0800
Timothee Cour <timothee.cour2@xxxxxxxxx> wrote:
> ```
> $ dmd -of ~/READ[TAB] => TAB completion works
> $ dmd -of=~/READ[TAB] => no TAB completion because preceeded by `=`
> ```
>
> how would I customize the separators after which TAB completion operates?
In this case, your best bet might be simply "setopt magicequalsubst".
That means all "=" on the command line are treated (roughly) like
assignments for the purpose of expansion. Unless you regularly have =
as part of a file name that should be fine.
Detailed configuration of completion tends to be quite murky as its
specific to the context you're in. The usual answer would be to
write a completer for dmd using _arguments and tell it that
-of is an option accepting "=" and taking file arguments. There
are umpteen examples of this in the completion system. We'd
distribute a completion for _dmd if someone wrote one.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author