zsh-users
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: Completion once again..
Date: Mon, 22 Jan 2001 13:17:20 +0100 (MET)	[thread overview]
Message-ID: <200101221217.NAA06157@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Tarmo =?ISO-8859-1?Q?J=E4rvi?='s message of Sat, 20 Jan 2001 16:26:42 +0000 (GMT+00:00)

[-- 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


             reply	other threads:[~2001-01-22 12:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-22 12:17 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-22 14:25 Tarmo Järvi
2001-01-20 16:26 Tarmo Järvi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200101221217.NAA06157@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).