zsh-users
 help / color / mirror / code / Atom feed
* Re: Completion once again..
@ 2001-01-22 14:25 Tarmo Järvi
  0 siblings, 0 replies; 3+ messages in thread
From: Tarmo Järvi @ 2001-01-22 14:25 UTC (permalink / raw)
  To: zsh-users

Hello,

>If you only want to see the matching files together with the
>directories, use only one `-g' and apend the `*(-/)' to the `*.(tar|...)'
>with a space betwen them.

Oh, it was that magic space which made all the difference! Thanks for the tip!


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

* Re: Completion once again..
@ 2001-01-22 12:17 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2001-01-22 12:17 UTC (permalink / raw)
  To: zsh-users

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]


Tarmo Järvi wrote:

> Hello list,
> 
> and my apologies if this question has been asked several times but I couldn't find answer anywhere.
> 
> Anyway, here's my question: I have in ~/.zshrc:
> 
> compctl -g '*.(tar|t[ag]z|tz|tar.gz|tar.Z|tarZ|tar.bz2)' + -g '*(-/)' {,ls,un,g,gnu}tar
> 
> and in /tmp:
> 
> foo.tar
> bar/
> bar/snafu.tar
> 
> if I 'cd /tmp' and type tar <TAB> I get:
> 
> tar foo.tar
> 
> How do I get menu with all directories files matching definitions above? I've tried numerous tricks but I couldn't made it.

If you only want to see the matching files together with the
directories, use only one `-g' and apend the `*(-/)' to the `*.(tar|...)'
with a space betwen them.

If you want to see `foo.tar' and `bar/snafu.tar' as completions at the
same time, you would have to write a completion function and make it
be called `compctl -K'. There you could use `**/*.(tar|...)'. But I
doubt that you really want that, because of the possibility of
accidentally making it scan great parts of your directory structure.

Or maybe I didn't really understand what you want?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* Completion once again..
@ 2001-01-20 16:26 Tarmo Järvi
  0 siblings, 0 replies; 3+ messages in thread
From: Tarmo Järvi @ 2001-01-20 16:26 UTC (permalink / raw)
  To: zsh-users

Hello list,

and my apologies if this question has been asked several times but I couldn't find answer anywhere.

Anyway, here's my question: I have in ~/.zshrc:

compctl -g '*.(tar|t[ag]z|tz|tar.gz|tar.Z|tarZ|tar.bz2)' + -g '*(-/)' {,ls,un,g,gnu}tar

and in /tmp:

foo.tar
bar/
bar/snafu.tar

if I 'cd /tmp' and type tar <TAB> I get:

tar foo.tar

How do I get menu with all directories files matching definitions above? I've tried numerous tricks but I couldn't made it.

Thanks for help, Tarmo.


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

end of thread, other threads:[~2001-01-22 14:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-22 14:25 Completion once again Tarmo Järvi
  -- strict thread matches above, loose matches on Subject: below --
2001-01-22 12:17 Sven Wischnowsky
2001-01-20 16:26 Tarmo Järvi

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