Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: _urls again (Re: setopt localoptions noautoremoveslash)



Sven Wischnowsky wrote:
 
> Do you mean to say that you still get this or that you fixed it? At
> least I don't get either of these after your patch. If you still get
> them, I need more information about your configuration and the
> possible matches that triggered it.

I mean that I still get this.

I tracked down the first problem to setopt glob_complete. i.e, the
following is sufficient to cause the problem:
zsh -f
ZLS_COLOURS=...;SELECTMIN=0;zmodload complist
autoload -U compinit;compinit -d
compconf urls_localhttp=...
setopt globcomplete

In the process, I established that _urls requires globcomplete; patch
follows.

With respect to the second problem, I think I was just confused by the
fact that I got a listing which looks like:
file
directory
fred/    joe
when I expected the file to appear before 'directory' so sorry for not
checking it before I sent the mail.

Tanaka Akira wrote:
> +++ Completion/User/_urls       1999/10/15 14:28:55
> @@ -1,4 +1,4 @@
> -#autoload
> +#compdef curl

Shouldn't this be done in _webbrowser. Or we should do what I suggested
before which is to ditch _webbrowser, add the programs to a compdef in
_urls and negate the meaning of -f to _urls.

> * Use [[ ... ]] instead of [ ... ].

Could someone please explain why [[ ... ]] seems to be prefered where
both forms provide the same functionality ? Sven also changed my use of
[ -d ... ] to use the double square brackets. Is it faster or something?

Oliver Kiddle

--- _urls.bak3	Fri Oct 15 16:11:03 1999
+++ _urls	Fri Oct 15 16:13:26 1999
@@ -37,6 +37,8 @@
 #    name used by a user placing web pages within their home area.
 #    e.g. compconf
urls_localhttp=www:/usr/local/apache/htdocs:public_html
 
+setopt localoptions extendedglob
+
 local ipre scheme host user dirs files ret=1 expl
 local localhttp_servername="${${(@s.:.)compconfig[urls_localhttp]}[1]}"
 local
localhttp_documentroot="${${(@s.:.)compconfig[urls_localhttp]}[2]}"



Messages sorted by: Reverse Date, Date, Thread, Author