zsh-users
 help / color / mirror / code / Atom feed
* bash-like completion?
@ 1997-09-26 12:14 Karsten Thygesen
  1997-09-26 12:40 ` Andrew Main
  1997-09-26 18:02 ` Matthew Lovell
  0 siblings, 2 replies; 8+ messages in thread
From: Karsten Thygesen @ 1997-09-26 12:14 UTC (permalink / raw)
  To: zsh-users


Hi

How can I make zsh filename-complete something after a string? Ie:

./configure --prefix=/usr/loc<COMPLETE>


Bash handles this just fine pr. default, but I can't fingure out how
to make zsh do the same?

This is the single reason, that zsh is not my default shell yet...

Best,
Karsten

-- 
M.Sc.E.E, Sys/Net-administrator, BOFH, Aalborg University, Denmark
http://www.kom.auc.dk/~karthy/ for more information.
SunSITE Denmark Manager (http://sunsite.auc.dk/)
# $Id: .signature,v 1.1 1997/06/18 08:30:00 karthy Exp $


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

* Re: bash-like completion?
  1997-09-26 12:14 bash-like completion? Karsten Thygesen
@ 1997-09-26 12:40 ` Andrew Main
  1997-09-26 13:17   ` Wessel Dankers
  1997-09-26 18:02 ` Matthew Lovell
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Main @ 1997-09-26 12:40 UTC (permalink / raw)
  To: Karsten Thygesen; +Cc: zsh-users

Karsten Thygesen wrote:
>./configure --prefix=/usr/loc<COMPLETE>

compctl -x 's[--prefix=][--exec-prefix=][--bindir=]' -f - \
	's[]' -k '(--prefix --exec-prefix --bindir)' -Q -S '=' -- configure

Add prefixes as desired.  We should probably put a fuller version of this
into the distribution.

-zefram


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

* Re: bash-like completion?
  1997-09-26 12:40 ` Andrew Main
@ 1997-09-26 13:17   ` Wessel Dankers
  1997-09-26 13:32     ` Andrew Main
  1997-09-26 14:03     ` Bruce Stephens
  0 siblings, 2 replies; 8+ messages in thread
From: Wessel Dankers @ 1997-09-26 13:17 UTC (permalink / raw)
  To: zsh-users

On Fri, 26 Sep 1997, Andrew Main wrote:

> Karsten Thygesen wrote:
> >./configure --prefix=/usr/loc<COMPLETE>
> 
> compctl -x 's[--prefix=][--exec-prefix=][--bindir=]' -f - \
> 	's[]' -k '(--prefix --exec-prefix --bindir)' -Q -S '=' -- configure
> 
> Add prefixes as desired.  We should probably put a fuller version of this
> into the distribution.

Is it possible to do this in a global manner? Using compctl or setopt, but
not just for specific commands.

And what about an easier way to affect completion after command line flags?
All this compctl gibberish is very nice, but hardly user friendly. I'm
getting a bit tired to man zshcompctl all the time. Perhaps a gnucomp
builtin/function? That would make it easier to change the completion
behaviour for commands which use standard GNU-style options.

--
Wessel Dankers


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

* Re: bash-like completion?
  1997-09-26 13:17   ` Wessel Dankers
@ 1997-09-26 13:32     ` Andrew Main
  1997-09-26 16:11       ` Bart Schaefer
  1997-09-26 14:03     ` Bruce Stephens
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Main @ 1997-09-26 13:32 UTC (permalink / raw)
  To: Wessel Dankers; +Cc: zsh-users

Wessel Dankers wrote:
>Is it possible to do this in a global manner? Using compctl or setopt, but
>not just for specific commands.

setopt MAGIC_EQUAL_SUBST would probably do what you want.

>And what about an easier way to affect completion after command line flags?
>All this compctl gibberish is very nice, but hardly user friendly. I'm
>getting a bit tired to man zshcompctl all the time.

It's been discussed, but won't happen for a while yet.

-zefram


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

* Re: bash-like completion?
  1997-09-26 13:17   ` Wessel Dankers
  1997-09-26 13:32     ` Andrew Main
@ 1997-09-26 14:03     ` Bruce Stephens
  1997-09-26 16:50       ` Bart Schaefer
  1 sibling, 1 reply; 8+ messages in thread
From: Bruce Stephens @ 1997-09-26 14:03 UTC (permalink / raw)
  To: zsh-users


wsldanke@cs.ruu.nl said:
> Is it possible to do this in a global manner? Using compctl or 
> setopt, but not just for specific commands.

> And what about an easier way to affect completion after command line 
> flags? All this compctl gibberish is very nice, but hardly user 
> friendly. I'm getting a bit tired to man zshcompctl all the time. 
> Perhaps a gnucomp builtin/function? That would make it easier to 
> change the completion behaviour for commands which use standard 
> GNU-style options. 

Yeah, this would be nice.  Presumably this is kind of related to the EQUALS 
option, but for completion.  Also, for these particular options, then the 
brand new -/ flag is better than the -f flag, since these are all supposed to 
be directories.  (Or it will be, once everybody has a zsh which supports "-/".)

This would be nice for commands like make, too, where make variable 
assignments are often filenames (not necessarily directory names, though).  Or 
can this be done easily already?



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

* Re: bash-like completion?
  1997-09-26 13:32     ` Andrew Main
@ 1997-09-26 16:11       ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 1997-09-26 16:11 UTC (permalink / raw)
  To: zsh-users

On Sep 26,  2:32pm, Andrew Main wrote:
} Subject: Re: bash-like completion?
}
} Wessel Dankers wrote:
} >Is it possible to do this in a global manner? Using compctl or setopt, but
} >not just for specific commands.
} 
} setopt MAGIC_EQUAL_SUBST would probably do what you want.

I thought so, too, but it doesn't ... it applies only to globbing, not to
completion.


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: bash-like completion?
  1997-09-26 14:03     ` Bruce Stephens
@ 1997-09-26 16:50       ` Bart Schaefer
  0 siblings, 0 replies; 8+ messages in thread
From: Bart Schaefer @ 1997-09-26 16:50 UTC (permalink / raw)
  To: Bruce Stephens, zsh-users

On Sep 26,  3:03pm, Bruce Stephens wrote:
} Subject: Re: bash-like completion?
}
} wsldanke@cs.ruu.nl said:
} > Is it possible to do this in a global manner? Using compctl or 
} > setopt, but not just for specific commands.
} 
} Yeah, this would be nice.  Presumably this is kind of related to the EQUALS 
} option, but for completion.
} 
} This would be nice for commands like make, too, where make variable 
} assignments are often filenames (not necessarily directory names, though).
} Or  can this be done easily already?

How about this:

	compctl -Tx 'N[1,=]' -f

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


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

* Re: bash-like completion?
  1997-09-26 12:14 bash-like completion? Karsten Thygesen
  1997-09-26 12:40 ` Andrew Main
@ 1997-09-26 18:02 ` Matthew Lovell
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Lovell @ 1997-09-26 18:02 UTC (permalink / raw)
  To: Karsten Thygesen; +Cc: zsh-users

On 26 September 1997, Karsten Thygesen writes:
 > 
 > Hi
 > 
 > How can I make zsh filename-complete something after a string? Ie:
 > 
 > ./configure --prefix=/usr/loc<COMPLETE>

I use this to get completion on "export" commands:


 # if asked to complete export ..., use files and directories after the =
 # and existing shell variables before the =
 compctl -E -S '=' -x 'n[1,=]' -f -- export    



-- 

Matthew Lovell                       voice: (970) 229-6264 
Hewlett-Packard FSL                    fax: (970) 229-2510 
3404 E. Harmony Rd. MS A0         location: 3UR4
Fort Collins, CO 80525              mailto:lovell@fc.hp.com  


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

end of thread, other threads:[~1997-09-26 18:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-26 12:14 bash-like completion? Karsten Thygesen
1997-09-26 12:40 ` Andrew Main
1997-09-26 13:17   ` Wessel Dankers
1997-09-26 13:32     ` Andrew Main
1997-09-26 16:11       ` Bart Schaefer
1997-09-26 14:03     ` Bruce Stephens
1997-09-26 16:50       ` Bart Schaefer
1997-09-26 18:02 ` Matthew Lovell

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