zsh-users
 help / color / mirror / code / Atom feed
* compctl and firefox
@ 2010-11-18  3:59 Bruno Tavernier
  2010-11-18 18:13 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Tavernier @ 2010-11-18  3:59 UTC (permalink / raw)
  To: zsh-users

Hello all,

I've got an issue with the completion mechanism.

In my .zshrc, I have this
,----
| compctl -g '*(-/) *.html' firefox
| compctl -g '*(-/) *.html' w3m
`----
Note: these are the only lines where html, firefox or w3m appear

w3m works fine (i.e. only html files are listed)
,----
| % w3m <TAB>
| % w3m
| test.html
`----

However for firefox it fails...
,----
| % firefox <TAB>
| % firefox
| test.dat
| test.html
`----

If in .zshrc I replace firefox by firefo
then it works.
,----
| % firefo <TAB>
| % firefo
| test.html
`----

Can anyone reproduce this? How can I debug that?


-- 
Bruno


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

* Re: compctl and firefox
  2010-11-18  3:59 compctl and firefox Bruno Tavernier
@ 2010-11-18 18:13 ` Bart Schaefer
  2010-11-19  2:59   ` Bruno Tavernier
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2010-11-18 18:13 UTC (permalink / raw)
  To: zsh-users

On Nov 18, 12:59pm, Bruno Tavernier wrote:
}
} In my .zshrc, I have this
} ,----
} | compctl -g '*(-/) *.html' firefox
} | compctl -g '*(-/) *.html' w3m
} `----

Are you certain that you're even using the compctl completions?  Most
configurations nowadays use what we call "compsys", and have compctl
as a fallback at best.

} w3m works fine (i.e. only html files are listed)
} ,----
} | % w3m <TAB>
} | % w3m
} | test.html
} `----

If instead of <TAB> you type <ctl+x>h what do you see?  If similar to:

tags in context :completion::complete:w3m::
    argument-rest options  (_arguments _w3m (eval))
...

then you need to use styles instead of compctl commands to control the
patterns used for file matching, like this:

zstyle ':completion::complete:firefox:*:' file-patterns '*(-/) *.html'


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

* Re: compctl and firefox
  2010-11-18 18:13 ` Bart Schaefer
@ 2010-11-19  2:59   ` Bruno Tavernier
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Tavernier @ 2010-11-19  2:59 UTC (permalink / raw)
  To: zsh-users

Bart Schaefer <schaefer@brasslantern.com> writes:

> On Nov 18, 12:59pm, Bruno Tavernier wrote:
> }
> } In my .zshrc, I have this
> } ,----
> } | compctl -g '*(-/) *.html' firefox
> } | compctl -g '*(-/) *.html' w3m
> } `----
>
> Are you certain that you're even using the compctl completions?  Most
> configurations nowadays use what we call "compsys", and have compctl
> as a fallback at best.
>
> } w3m works fine (i.e. only html files are listed)
> } ,----
> } | % w3m <TAB>
> } | % w3m
> } | test.html
> } `----
>
> If instead of <TAB> you type <ctl+x>h what do you see?  If similar to:
>
> tags in context :completion::complete:w3m::
>     argument-rest options  (_arguments _w3m (eval))
> ...
>
> then you need to use styles instead of compctl commands to control the
> patterns used for file matching, like this:
>
> zstyle ':completion::complete:firefox:*:' file-patterns '*(-/) *.html'

zstyle does the job! These compctl were probably remains of an old
config. My apologies for the noise.

Thank you Bart!


-- 
Bruno


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

end of thread, other threads:[~2010-11-19  3:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18  3:59 compctl and firefox Bruno Tavernier
2010-11-18 18:13 ` Bart Schaefer
2010-11-19  2:59   ` Bruno Tavernier

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