zsh-workers
 help / color / mirror / code / Atom feed
* strange completion
@ 1995-05-29  5:10 Soren Dayton
  1995-05-29  5:13 ` Soren Dayton
  1995-05-29  5:52 ` Bas V. de Bakker
  0 siblings, 2 replies; 4+ messages in thread
From: Soren Dayton @ 1995-05-29  5:10 UTC (permalink / raw)
  To: zsh-workers


This may be a bug.  I am not sure, I do not understand completion well
enough.


compctl -x 'C[-1,-*r*]' -g '*(/)' -g '*(-/)' -- rm

in my home directory:

woodlawn% rm -rf .<tab>
	completes to
woodlawn% rm -rf .p

This makes no sense to me...

compctl -x 'C[-1,-*d*]' -g '*.gz *.Z *.z' -g '*(-/)' -- gzip

here, I am in a directory with a directory and a tar.gz file

gzip -d <tab>
 will complete to
gzip -d <directory>

Am I misunderstanding this?  I want this to complete to .gz files.  

thanks
Soren Dayton


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

* Re: strange completion
  1995-05-29  5:10 strange completion Soren Dayton
@ 1995-05-29  5:13 ` Soren Dayton
  1995-05-29  5:59   ` Richard Coleman
  1995-05-29  5:52 ` Bas V. de Bakker
  1 sibling, 1 reply; 4+ messages in thread
From: Soren Dayton @ 1995-05-29  5:13 UTC (permalink / raw)
  To: zsh-workers; +Cc: zsh-workers

>woodlawn% rm -rf .p
>
>This makes no sense to me...

I am sorry.  I just noticed somethign foolish.  this works fine

>compctl -x 'C[-1,-*d*]' -g '*.gz *.Z *.z' -g '*(-/)' -- gzip

This still does not work...

Soren Dayton


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

* Re: strange completion
  1995-05-29  5:10 strange completion Soren Dayton
  1995-05-29  5:13 ` Soren Dayton
@ 1995-05-29  5:52 ` Bas V. de Bakker
  1 sibling, 0 replies; 4+ messages in thread
From: Bas V. de Bakker @ 1995-05-29  5:52 UTC (permalink / raw)
  To: csdayton; +Cc: zsh-workers

Soren Dayton <csdayton@midway.uchicago.edu> writes:

> This makes no sense to me...

> compctl -x 'C[-1,-*d*]' -g '*.gz *.Z *.z' -g '*(-/)' -- gzip

> here, I am in a directory with a directory and a tar.gz file

> gzip -d <tab>
>  will complete to
> gzip -d <directory>

> Am I misunderstanding this?  I want this to complete to .gz files.  

The two -g flags are used simultaneously, expanding to one set of
completions.  So if the directory is before the .gz file
alphabetically, it will complete first.  To use the second flag only
if the first one does not generate any completions, put a '+' between
them.

Hope this helps,

Bas.


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

* Re: strange completion
  1995-05-29  5:13 ` Soren Dayton
@ 1995-05-29  5:59   ` Richard Coleman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Coleman @ 1995-05-29  5:59 UTC (permalink / raw)
  To: zsh-workers

> >woodlawn% rm -rf .p
> >
> >This makes no sense to me...
> 
> I am sorry.  I just noticed somethign foolish.  this works fine
> 
> >compctl -x 'C[-1,-*d*]' -g '*.gz *.Z *.z' -g '*(-/)' -- gzip
> 
> This still does not work...

Try these.  This is from the compctl examples file.

# gzip files, but gzip -d only gzipped or compressed files
compctl -f -x 'R[-*d,^*]' -g '*.gz *.z *.Z' + -g '*(-/)' -- gzip
compctl -g '*.gz *.z *.Z' + -g '*(-/)' gunzip   # zcat if you use GNU
compctl -g '*.Z' + -g '*(-/)' uncompress zmore  # zcat if you don't use GNU


rc


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

end of thread, other threads:[~1995-05-29  6:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-05-29  5:10 strange completion Soren Dayton
1995-05-29  5:13 ` Soren Dayton
1995-05-29  5:59   ` Richard Coleman
1995-05-29  5:52 ` Bas V. de Bakker

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