zsh-workers
 help / color / mirror / code / Atom feed
From: opk101@cs.york.ac.uk (Oliver Kiddle)
To: pws@ifh.de, zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: Completion on cd
Date: Mon, 2 Feb 1998 13:45:51 +0000	[thread overview]
Message-ID: <swordfish.886427468@student.cs.york.ac.uk> (raw)
In-Reply-To: pws@ifh.de "Re: Completion on cd" (Feb  2, 10:12am)

On Feb 2, 10:12am, pws@ifh.de wrote:

> Remember you can stick '+' at the end of a completion to use the
> default as a default.  You could also try the patch I posted recently

That could be useful - I didn't know about it.

> for binding specific completions (find it at http://www.peak.org/zsh/ ,
> it's called something like 'completion widgets' and should apply
> cleanly to zsh-e.1.2-zefram3).  Then you do
> and use the special key sequence.  This is probably the only way of
> getting the level of control you want.

Well, I thing my compctl -Tx 's[~] C[0,[^/]#]' -k users -S/ completion
is doing all I want. I'll try those completion widgets though: they will
probably be useful for alternative user name completion for other
instances.

> Either you have different expectations or a different version of the
> shell from me.  Try with zsh -f again.  However, I don't understand
> where you're expecting the second / to come from, since -W will strip
> it --- it's for an implicit path, i.e. one which doesn't appear on the
> command line.  I would simply omit the -W and type the second / by
> hand or use some other compctl option to get it inserted if you
> insist, or alternatively change the omitted prefix to 's[file://]'.
> In fact, you shouldn't need to do even that since of course
> '//users/...' is recognised as a path, and -W doesn't strip more than
> you've asked it to.

I don't want a second /. A file URL is of one of two forms:

file:/path
 or
file://host/path

so I only want one / and I deal with s[file://] separately.
Anyway, I have got it working and am not quite sure why it wasn't
working before. Is there a way to have no suffix: -S '' doesn't seem to
work? Anyway, just in case anyone else wants to use it and can be
bothered to adjust it for their local web server name, it is as follows:

compctl -k '(http:// file: ftp:// gopher:// news://)' -S '' \
        -x 's[file://]' -k hostnames -S/ \
        - 's[file:/]' -/g '*.html' -W/ - 's[file:]' -s '`pwd`' -S '/' \
        - 's[http://www.york.ac.uk/~'$USER'/]' -/g '*.html' -W ~/web \
        - 's[http://www.york.ac.uk/~]' -k users -S/ + -u -S/ \
        - 's[http://www.york.ac.uk/]' -g '*.html' -W '/usr/local/web' \
        - 's[http://www]' -k '(.york.ac.uk)' -S/ \
        - 's[http://a]' -k '(tlas.cs.york.ac.uk)' -S/ \
        - 's[http://]' -k '(atlas www)' -S '.' \
        - 's[-]' -k '(anonymous auth base book buried_news cache case
cfg child cookies crawl display dump editor emacskeys enable_scrollback
error_file fileversions force_html from ftp get_data head help
historical homepage image_links index link localhost locexec mime_header
minimal newschunksize newsmaxchunk nobrowse noexec nofilereferer
nofilereferer nolist nolog nopause noprint noredir noreferer nosocks
nostatus number_links popup post_data print pseudo_inlines raw realm
reload restrictions resubmit_posts rlogin selective show_cursor source
startfile_ok telnet term trace traversal underscore validate version
vikeys)' \
        -- lynx

Cheers

Oliver Kiddle


-- 
 __
/  \|.   _ _  |_/. _| _|| _     E-mail: opk101@cs.york.ac.uk
\__/||\/(-|   | \|(_|(_||(-        Web: http://www.york.ac.uk/~opk101/


             reply	other threads:[~1998-02-02 14:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-02 13:45 Oliver Kiddle [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-02-01 15:52 Oliver Kiddle
1998-02-02  9:12 ` Peter Stephenson
     [not found] <swordfish.886344199@student.cs.york.ac.uk>
1998-02-01 15:12 ` Andrej Borsenkow
     [not found] <199801280058.RAA25088@empire.Central.Sun.COM>
1998-01-28  8:54 ` Wessel Dankers

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=swordfish.886427468@student.cs.york.ac.uk \
    --to=opk101@cs.york.ac.uk \
    --cc=pws@ifh.de \
    --cc=zsh-workers@math.gatech.edu \
    /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).