help / Atom feed
* _files conditional custom separator
@ 2018-11-30 18:47 Pavel S. Mazurin
  0 siblings, 0 replies; 1+ messages in thread
From: Pavel S. Mazurin @ 2018-11-30 18:47 UTC (permalink / raw)
  To: zsh-users

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

I'm trying to create a completion script for buck
<https://github.com/facebook/buck>. In essence, I want to be able to
complete the following format:

buck //path/to/my/buck/file:TargetName

I managed to make completion work for the most part: I can complete
everything up to the TargetName:

buck //path/to/my/buck/file/

with the following script:

if compset -P '//'; then
  _files -/

The problem is that _files adds this / in the end of the path. However, I
want to have a check: if the path contains a BUCK file, I want this slash
to be replaced with a colon:

buck //path/to/my/buck/file:

Is there any way to achieve this?


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

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 18:47 _files conditional custom separator Pavel S. Mazurin


Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox