zsh-users
 help / color / mirror / code / Atom feed
From: Scott Lipcon <slipcon@mercea.net>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
Cc: zsh-users@sunsite.dk, slipcon@mercea.net
Subject: Re: new completion modifications
Date: Thu, 22 Mar 2001 10:34:09 -0500	[thread overview]
Message-ID: <20010322153409.CABF126267@mercea.net> (raw)
In-Reply-To: Message from Sven Wischnowsky <wischnow@informatik.hu-berlin.de>  of "Thu, 22 Mar 2001 11:00:55 +0100." <200103221000.LAA05184@beta.informatik.hu-berlin.de>

> > $hosts=(commonly used hosts)
> > $sshhosts=(hosts I ssh to)
> > $pages=(a list of URLs I visit)
> 
> You certainly mean `hosts=(...)'.  Written too much perl lately ? ;-)

yup, thanks.  I had it right in my .zshrc :)


> > 
> > zstyle ':*' hosts $hosts
> > zstyle ':*' hosts $sshhosts
> 
> The second call overrides the first one.
> 
> > First, which is the magic zstyle for a list of URLs?  It seems that 
> > lynx/netscape use http:/(hosts)/ by default.
> 
> See the description of the `urls' tag and the `path' style in the
> docs.

OK - that put me on the right track, but its still not quite working the 
way I'm used to.  I created the directory tree:

~/.zsh/urls/http/www.myhost.com/directory/file.html

and did:

% zstyle ':completion:*:urls' path $HOME/.zsh/urls/

now to get the whole url, I have to type:

% lynx h<tab>w<tab>d<tab>f<tab>

or just:

% lynx h<tab><tab><tab><tab>

While I can see that this directory structure is useful if you have 
hundreds of URLs, many from the same hosts, it really isn't great for me -
I probably have 5 or 10 URLs that I'd like to complete in this manner, all
unique in the host portion (so I'd like to be able to type enough of the host
to identify the url, and have the whole thing expand on a tab)


> You can't without modifying the function.  But it's *very* simple.  At 
> the beginning of _rlogin you see:

OK, thanks - that works fine.  I didn't want to modify it if I didn't
have to though.

> If you want to help us and others you could try to find a (secure)
> test if the `rlogin' supports kerberos-specific options.  If there is
> such a test we could add it to the distributed _rlogin to make it
> support these commands out-of-the-box.


This seems to work on my system:

% /usr/bin/rlogin -x 2>&1 | egrep '(illegal|invalid) option' > /dev/null && echo kerberized
% /usr/local/bin/rlogin -x 2>&1 | egrep '(illegal|invalid) option' > /dev/null && echo kerberized
kerberized
%

/usr/bin/rlogin is the stock FreeBSD rlogin, /usr/local/bin/rlogin is from  
the kerberos distribution (1.2.1, I believe)  I also tested it on a linux
system (with no kerberos).

Not sure how to integrate this.


I've got one more question - hopefully not too basic :)

I use nmh/exmh for email - the new completion system is wonderful.  It just 
works, I can get rid of literally 200 lines of functions and compctl's.   I 
have one small problem though - mutt can read mh folders, and occasionally 
I use it to quickly read through a folder.  Is there an easy way (using
zstyle) to tell mutt to use mh folder completions after -f?  If not, any
hints on how to modify _mutt to use mh folders?  It seems that _mutt's 
-f flag uses _mailboxes to complete, and _mailboxes doesn't know about
mh folders.

Thanks very much,

Scott


  reply	other threads:[~2001-03-22 15:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-22 10:00 Sven Wischnowsky
2001-03-22 15:34 ` Scott Lipcon [this message]
2001-03-22 16:01   ` Bart Schaefer
2001-03-22 16:28     ` Scott Lipcon
2001-03-22 21:08       ` Bart Schaefer
2001-03-22 21:50         ` Scott Lipcon
2001-03-23 16:09           ` Bart Schaefer
2001-03-23 16:27             ` Scott Lipcon
2001-03-23 17:14               ` Bart Schaefer
2001-03-23 18:37                 ` Scott Lipcon
2001-03-23 18:54                   ` Bart Schaefer
2001-03-23 20:16                     ` Scott Lipcon
2001-03-24 17:22                       ` Bart Schaefer
2001-03-22 16:58 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2001-03-23 14:07 Sven Wischnowsky
2001-03-22  3:58 Scott Lipcon
2001-03-22 10:21 ` Oliver Kiddle

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=20010322153409.CABF126267@mercea.net \
    --to=slipcon@mercea.net \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-users@sunsite.dk \
    /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).