zsh-users
 help / color / mirror / code / Atom feed
* how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`)
@ 2017-01-17  7:15 ` Timothee Cour
  2017-01-17  9:43   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Timothee Cour @ 2017-01-17  7:15 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

```
$ 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?
Ideally something analog to $WORDCHARS (eg: $TAB_COMPLETION_CHARS, eg:
```
export TAB_COMPLETION_CHARS=":= "
```

Please let me know if anything is unclear

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`)
  2017-01-17  7:15 ` how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`) Timothee Cour
@ 2017-01-17  9:43   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2017-01-17  9:43 UTC (permalink / raw)
  To: Zsh Users

On Mon, 16 Jan 2017 23:15:33 -0800
Timothee Cour <timothee.cour2@gmail.com> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-17  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170117073841epcas5p38b85960fdaef1834021ddeaa71738b56@epcas5p3.samsung.com>
2017-01-17  7:15 ` how to allow tab completion in `flag=complete_me` ? (ie after a customizable symbol like `=`) Timothee Cour
2017-01-17  9:43   ` Peter Stephenson

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).