zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: completion for hosts and character classes
@ 1999-07-02  9:48 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-02  9:48 UTC (permalink / raw)
  To: zsh-workers


Oliver Kiddle wrote:

> The other part of the patch is
> to complete the character classes like [:blank:]. This seems to work but
> as with my other attempts to patch _subscript, will probably need a bit
> of tidying up.

Using a rather dirty trick ;-) I would never had thought of that...

There is a small problem because it doesn't work with `[:<TAB>'
because without any characters before the `[' this isn't recognised as 
a subscript. The only solution I can see for this now would be to put
some code into _first, but somehow I don't feel like doing that...

While testing the above I found a little buglet in _expand which
insisted on expand `[:' to `[:(N)'.

Bye
 Sven

diff -u oc/Core/_expand Completion/Core/_expand
--- oc/Core/_expand	Fri Jul  2 11:34:39 1999
+++ Completion/Core/_expand	Fri Jul  2 11:42:44 1999
@@ -57,7 +57,7 @@
 #    `%o' in this string will be replaced by the original string.
 
 local exp word="$PREFIX$SUFFIX" group=-V
-
+set -x
 # Do this only for the first global matcher.
 
 [[ "$compstate[matcher]" -le 1 ]] || return 1
@@ -88,7 +88,7 @@
 # as the original string, we let other completers run.
 
 [[ $#exp -eq 0 ||
-   ( $#exp -eq 1 && "$exp[1]" = "$word" ) ]] && return 1
+   ( $#exp -eq 1 && "$exp[1]" = "$word"(|\(N\)) ) ]] && return 1
 
 # We have expansions, should we menucomplete them?
 

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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: PATCH: completion for hosts and character classes
@ 1999-07-02 13:07 Sven Wischnowsky
  0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-07-02 13:07 UTC (permalink / raw)
  To: zsh-workers


I wrote:

> -
> +set -x

Ahem.

Bye
 Sven

diff -u oc/Core/_expand Completion/Core/_expand
--- oc/Core/_expand	Fri Jul  2 15:06:51 1999
+++ Completion/Core/_expand	Fri Jul  2 15:06:55 1999
@@ -57,7 +57,7 @@
 #    `%o' in this string will be replaced by the original string.
 
 local exp word="$PREFIX$SUFFIX" group=-V
-set -x
+
 # Do this only for the first global matcher.
 
 [[ "$compstate[matcher]" -le 1 ]] || return 1

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


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: PATCH: _subscript, Re: pws-23
@ 1999-06-21 11:43 Peter Stephenson
  1999-07-01 14:34 ` PATCH: completion for hosts and character classes Oliver Kiddle
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1999-06-21 11:43 UTC (permalink / raw)
  To: Zsh hackers list

"Kiddle, Oliver" wrote:
> _subscript in pws-23 seems to have been slightly damaged, probably due to
> word wrapping somewhere.

I've received this one with the first hunk wrapped, too.  It's probably
your end, since I've haven't noticed it when Sven and others having been
flinging patches about with abandon.

> I use print -D to print
> the value of the array. This is rather useful with things like path where
> things get compacted to something like ~/bin.

I wish there was a way of getting things like this done without forking,
roughly the way TCL does.

> BTW, the _hosts change which I sent last Friday (and which isn't in pws-23)
> doesn't work with my hosts file at home so I'll send a replacement later in
> the week.

I must have forgotten about that.  But we probably need more sophisticated
ways of generating host names from all sorts of different sources.
/etc/hosts isn't all that well used any more.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


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

end of thread, other threads:[~1999-07-02 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-02  9:48 PATCH: completion for hosts and character classes Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-07-02 13:07 Sven Wischnowsky
1999-06-21 11:43 PATCH: _subscript, Re: pws-23 Peter Stephenson
1999-07-01 14:34 ` PATCH: completion for hosts and character classes Oliver Kiddle
1999-07-02  9:10   ` Peter Stephenson

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