zsh-users
 help / color / mirror / code / Atom feed
* new completion modifications
@ 2001-03-22  3:58 Scott Lipcon
  2001-03-22 10:21 ` Oliver Kiddle
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-22  3:58 UTC (permalink / raw)
  To: zsh-users

Hello,

I just upgraded from 3.0.x to a 3.1.9 version, and I'm starting to tweak the 
new completions to work the way I like.  I have a few questions that I hope 
aren't too basic.

Before, I had a few variables defined:

$hosts=(commonly used hosts)
$sshhosts=(hosts I ssh to)
$pages=(a list of URLs I visit)

and used:

compctl -k hosts telnet rlogin ftp ncftp ping traceroute 
compctl -k sshhosts ssh ssh1 ssh2
compctl -k pages lynx netscape netscape4

(along with some more advanced scp compctls)

I've got this mostly working by simply doing:

zstyle ':*' hosts $hosts
zstyle ':*' hosts $sshhosts

First, which is the magic zstyle for a list of URLs?  It seems that 
lynx/netscape use http:/(hosts)/ by default.

Second, is there an easy way to limit my $hosts expansions to telnet, rlogin, 
ftp, etc, and $sshhosts to ssh, scp, etc?  using the above zstyles, they are 
all thrown in one completion basket.

Lastly, the default _rlogin  completion file doesn't work for me - we use the 
kerberized version of rlogin, which takes the -x option:

% rlogin host<tab>

completes properly, as does rlogin -l user host<tab>.

however, 

% rlogin -x host<tab>  

does nothing.  

How can I add the -x flag to the rlogin completion definition, without 
modifying the system file?  (kerberized rlogin seems to have lots of other 
options that also aren't included - I only use -x however)


Thanks,

Scott 







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

* Re: new completion modifications
  2001-03-22  3:58 new completion modifications Scott Lipcon
@ 2001-03-22 10:21 ` Oliver Kiddle
  0 siblings, 0 replies; 17+ messages in thread
From: Oliver Kiddle @ 2001-03-22 10:21 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

--- Scott Lipcon <slipcon@mercea.net> wrote:

> Second, is there an easy way to limit my $hosts expansions to telnet,
> rlogin, 
> ftp, etc, and $sshhosts to ssh, scp, etc?  using the above zstyles,
> they are 
> all thrown in one completion basket.

You can do this by using different contexts with the zstyle command.
For completion, contexts are of the form:
:completion:<function>:<completer>:<command>:<arg>:<tag>
(this line is so useful that I keep it in a comment in my .zshrc)
so we can use a context which restricts the command. So you can use
something like:

  zstyle '*' hosts $hosts
  zstyle ':completion:*:*:(ssh|scp):*' hosts $sshhosts

In the second zstyle, the context is more specific so when it matches
(for the ssh and scp commands), it will be used instead of the first
zstyle which will work in other cases.

You could similarly use a different context for hosts to use with other
programs like telnet, lynx, netscape etc.

There are also a few other styles you might find useful. Look-up the
users-hosts, users-hosts-ports, local and path styles in the manual.
That should give you the "magic zstyles" for urls.

Note to -workers - should _ssh be completing for ssh1 and ssh2 too?

It'll be quite possible to add other options to _rlogin but I'm not
familiar with any of the options beyond -l so I'll leave it to someone
else. Ideally, we would want to be able to work out if rlogin supports
kerberos so we know which set of options to complete.

Oliver



____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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

* Re: new completion modifications
  2001-03-23 20:16                     ` Scott Lipcon
@ 2001-03-24 17:22                       ` Bart Schaefer
  0 siblings, 0 replies; 17+ messages in thread
From: Bart Schaefer @ 2001-03-24 17:22 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 23,  3:16pm, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} The difference now is that scan (and other MH tools) completions handle
} subfolders fine, mutt doesn't. 

A patch for this was recently sent to zsh-workers, so it'll eventually
appear in a zsh near you.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-23 18:54                   ` Bart Schaefer
@ 2001-03-23 20:16                     ` Scott Lipcon
  2001-03-24 17:22                       ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-23 20:16 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

> Sigh.  The differences are bigger than I thought.  Try sticking this
> in there in place of the above:

Thanks!  that mostly works - good enough for my uses anyway.  
The difference now is that scan (and other MH tools) completions handle
subfolders fine, mutt doesn't. 

% scan +inb<tab>

completes to:

% scan +inbox/

and my cursor is immediately after the /.

% mutt -f +inb<tab>

completes to:

% mutt -f +inbox 

and my cursor is after the space (two characters after the x)  

as I said - good enough :)   I think I'll just leave my home machine
running 3.0.8 for now though, eventaully moving to the new version.

Scott

> 
>     (*:mutt:*)
>       if compset -P '='; then
>         mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirecto
> ry/
> }" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}"
> )
>       elif compset -P +; then
>         mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirecto
> ry/
> }" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}"
> )
>       else
>       mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
>                    "${_maildir_cache[@]}" "${_mh_cache[@]}" )
>       mbox_short=( \! \< \> )
>       fi
>       ;;
> 
> If that doesn't work, you're going to have to upgrade.
> 
> -- 
> Bart Schaefer                                 Brass Lantern Enterprises
> http://www.well.com/user/barts              http://www.brasslantern.com
> 
> Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   
> 


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

* Re: new completion modifications
  2001-03-23 18:37                 ` Scott Lipcon
@ 2001-03-23 18:54                   ` Bart Schaefer
  2001-03-23 20:16                     ` Scott Lipcon
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2001-03-23 18:54 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 23,  1:37pm, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} OK - I copied _mailboxes to my zsh functions directory, and modified it 
} to include mh_cache:
} 
}  (*:mutt:*)
}       mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
}                    "${_maildir_cache[@]}" "${_mh_cache[@]}" )
}       mbox_short=( \! \< \> );;

Sigh.  The differences are bigger than I thought.  Try sticking this
in there in place of the above:

    (*:mutt:*)
      if compset -P '='; then
        mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirectory/
}" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}")
      elif compset -P +; then
        mbox_names=( "${_mutt_cache[@]#[+=]}" "${(@)_mbox_cache#$~maildirectory/
}" "${(@)_maildir_cache#$~maildirectory/}" "${(@)_mh_cache#$~maildirectory/}")
      else
      mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
                   "${_maildir_cache[@]}" "${_mh_cache[@]}" )
      mbox_short=( \! \< \> )
      fi
      ;;

If that doesn't work, you're going to have to upgrade.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-23 17:14               ` Bart Schaefer
@ 2001-03-23 18:37                 ` Scott Lipcon
  2001-03-23 18:54                   ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-23 18:37 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

> That trace doesn't look quite right ...
> 
> AHA!  CVS has the answer.  You're using 3.1.9, and _mailboxes didn't find
> out that mutt knows about MH mailboxes until sometime after that.  You
> can either upgrade to 4.0.1-pre-2, or you can find the (*:mutt:*) case
> label in the _mua_mailboxes function in Completion/User/_mailboxes and
> add "${_mh_cache[@]}" to the array assignment.

OK - I copied _mailboxes to my zsh functions directory, and modified it 
to include mh_cache:

 (*:mutt:*)
      mbox_names=( "${_mutt_cache[@]}" "${_mailbox_cache[@]}"
                   "${_maildir_cache[@]}" "${_mh_cache[@]}" )
      mbox_short=( \! \< \> );;


I then restarted zsh, and confirmed that it has the right definition for 
_mua_mailboxes.  I unset _mailbox_cache.

mutt -f +inb<tab>  still doesn't work.    Again the trace is pretty large,
so its at  http://mercea.net/~slipcon/misc/zsh25027mutt3

Thanks for all your help,
Scott


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

* Re: new completion modifications
  2001-03-23 16:27             ` Scott Lipcon
@ 2001-03-23 17:14               ` Bart Schaefer
  2001-03-23 18:37                 ` Scott Lipcon
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2001-03-23 17:14 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 23, 11:27am, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} yup, $_mailbox_cache was set to /var/mail/slipcon, which does exist, but 
} isn't used because mail gets filtered straight to my MH folders.

That's OK, _mailbox_cache is just used as a flag value to indicate that
all the other _cache variables have also been set.

} I unset _mailbox_cache, and ran it again.  completion still doesn't work

That trace doesn't look quite right ...

AHA!  CVS has the answer.  You're using 3.1.9, and _mailboxes didn't find
out that mutt knows about MH mailboxes until sometime after that.  You
can either upgrade to 4.0.1-pre-2, or you can find the (*:mutt:*) case
label in the _mua_mailboxes function in Completion/User/_mailboxes and
add "${_mh_cache[@]}" to the array assignment.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-23 16:09           ` Bart Schaefer
@ 2001-03-23 16:27             ` Scott Lipcon
  2001-03-23 17:14               ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-23 16:27 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

> There is this, though:
> 
> +_mailboxes:6> ((  ! 1  ))
> 
> That's `if (( ! $+_mailbox_cache )) then' in _mailboxes.  So your zsh
> thinks it has already cached all the mailboxes it needs to know about.
> There probably should be some other way to force _mailboxes to reload
> the cache besides:
> 
> unset _mailbox_cache

yup, $_mailbox_cache was set to /var/mail/slipcon, which does exist, but 
isn't used because mail gets filtered straight to my MH folders.

I unset _mailbox_cache, and ran it again.  completion still doesn't work, and 
_mailbox_cache gets set back to /var/mail/slipcon.  The dump file is
over 400k, so I'm not going to send it to the list.  I've put it 
at http://mercea.net/~slipcon/misc/zsh25027mutt2

Thanks,
Scott


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

* Re: new completion modifications
  2001-03-22 21:50         ` Scott Lipcon
@ 2001-03-23 16:09           ` Bart Schaefer
  2001-03-23 16:27             ` Scott Lipcon
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2001-03-23 16:09 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 22,  4:50pm, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} > % mutt -f +inb<C-x?>
} > 
} > Control-x question-mark is bound to _complete_debug, which will dump a
} > trace of what the completion functions are doing into a temp file.
} 
} That doesn't seem to be bound on my system - nothing happens.  

Hmm, odd.  "compinit" should be picking it up, it has a #compdef line.

} I bound it manually (bindkey '^X?' _complete_debug) and get a ton of
} output - I'll attach it to this message.  there is no _mh_cache in 
} there at all.

There is this, though:

+_mailboxes:6> ((  ! 1  ))

That's `if (( ! $+_mailbox_cache )) then' in _mailboxes.  So your zsh
thinks it has already cached all the mailboxes it needs to know about.
There probably should be some other way to force _mailboxes to reload
the cache besides:

unset _mailbox_cache

and then try C-x ? again.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
@ 2001-03-23 14:07 Sven Wischnowsky
  0 siblings, 0 replies; 17+ messages in thread
From: Sven Wischnowsky @ 2001-03-23 14:07 UTC (permalink / raw)
  To: zsh-users


Scott Lipcon wrote:

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

This seems reasonable.  Question to everyone (and -workers in
particular): should we add a `urls' style, comparable to `hosts' and
such, that just gives a bunch of strings to complete as urls?
Probably taking precedence over the other things (different from
`hosts' and friends).

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

Hm, I had hoped there were some `--help' option saying something about 
kerberos.

Then we'd like to know about the other special options and which other 
commands are affected (rsh? rcp?).  With that we could integrate it
into _rlogin (does any of the -workers have a kerberos-rlogin?).


Bye
 Sven


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


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

* Re: new completion modifications
  2001-03-22 21:08       ` Bart Schaefer
@ 2001-03-22 21:50         ` Scott Lipcon
  2001-03-23 16:09           ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-22 21:50 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 932 bytes --]

> } % echo $maildirectory
> } /home/slipcon/Mail
> } % mutt -f +inb<tab>
> } (nothing happens)
> 
> Try typing
> 
> % mutt -f +inb<C-x?>
> 
> Control-x question-mark is bound to _complete_debug, which will dump a
> trace of what the completion functions are doing into a temp file.

That doesn't seem to be bound on my system - nothing happens.  
On a linux system, it works, but I dont have mh or my completions
configured there.   The system zsh start up files don't seem to 
do anything special either. 

I bound it manually (bindkey '^X?' _complete_debug) and get a ton of
output - I'll attach it to this message.  there is no _mh_cache in 
there at all.



> You're looking to see what gets put into the _mh_cache array parameter.
> 
> What's your $ZSH_VERSION, again?

3.1.9 on FreeBSD (its the zsh-devel port from the FreeBSD 4.2 ports tree)

the linux box is also 3.1.9, I beleive its from the Mandrake RPM.

Thanks,
Scott


[-- Attachment #2: zsh25027mutt1 --]
[-- Type: text/plain, Size: 25022 bytes --]

+_complete_debug:16> _main_complete
+_main_complete:19> setopt localoptions nullglob rcexpandparam extendedglob
+_main_complete:20> unsetopt markdirs globsubst shwordsplit nounset ksharrays
+_main_complete:24> setopt localtraps noerrexit
+_main_complete:24> trap - ZERR
+_main_complete:26> local func funcs ret=1 tmp _compskip format nm call _completers _completer _completer_num curtag _comp_force_list _matchers _matcher _matcher_num _comp_tags _comp_mesg context state line opt_args val_args curcontext= _last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel _saved_exact= _saved_lastprompt=yes _saved_list=ambiguous _saved_insert=automenu-unambiguous _saved_colors=(parameters):
+_main_complete:37> typeset -U _lastdescr _comp_ignore
+_main_complete:39> [[ -z  ]]
+_main_complete:39> curcontext=::: 
+_main_complete:41> [[ automenu-unambiguous == tab* ]]
+_main_complete:51> [[ -z  ]]
+_main_complete:52> compset -P 1 =
+_main_complete:54> [[ + != */* && + == ~ ]]
+_main_complete:62> _setup default
+_setup:3> local val nm=0
+_setup:5> zstyle -a :completion:::::default list-colors val
+_setup:6> zmodload -i zsh/complist
+_setup:7> [[ default == default ]]
+_setup:8> ZLS_COLORS= 
+_setup:21> zstyle -t :completion:::::default list-packed
+_setup:23> [[ 2 -eq 1 ]]
+_setup:26> compstate[list]=ambiguous 
+_setup:29> zstyle -t :completion:::::default list-rows-first
+_setup:31> [[ 2 -eq 1 ]]
+_setup:34> compstate[list]=ambiguous 
+_setup:37> zstyle -t :completion:::::default last-prompt
+_setup:39> [[ 2 -eq 1 ]]
+_setup:42> compstate[last_prompt]=yes 
+_setup:45> zstyle -t :completion:::::default accept-exact
+_setup:47> [[ 2 -eq 1 ]]
+_setup:50> compstate[exact]= 
+_setup:53> [[ _last_nmatches -ge 0 ]]
+_setup:56> zstyle -a :completion:::::default menu val
+_setup:60> _last_nmatches=-1 
+_setup:63> [[  != always ]]
+_setup:64> zstyle -s :completion:::::default force-list val
+_main_complete:63> _def_menu_style=(  ) 
+_main_complete:72> _last_menu_style=( ) 
+_main_complete:74> zstyle -s :completion:::::default list-prompt tmp
+_main_complete:78> zstyle -s :completion:::::default select-prompt tmp
+_main_complete:82> zstyle -s :completion:::::default select-scroll tmp
+_main_complete:89> ((  0  ))
+_main_complete:101> zstyle -a :completion::::: completer _completers
+_main_complete:107> _completer_num=1 
+_main_complete:111> funcs=( ) 
+_main_complete:112> compprefuncs=( ) 
+_main_complete:117> tmp=_expand
+_main_complete:119> [[ -n  ]]
+_main_complete:121> [[ _expand == *:-* ]]
+_main_complete:124> [[ _expand == *:* ]]
+_main_complete:128> _completer=expand 
+_main_complete:130> curcontext=:expand:: 
+_main_complete:132> zstyle -a :completion::expand::: matcher-list _matchers
+_main_complete:133> _matchers=(  ) 
+_main_complete:135> _matcher_num=1 
+_main_complete:136> _matcher=
+_main_complete:137> [[ -n  ]]
+_main_complete:142> _expand
+_expand:10> setopt localoptions nullglob
+_expand:12> [[ _matcher_num -gt 1 ]]
+_expand:14> local exp word sort expr expl subd suf=  force opt
+_expand:16> ((  0  ))
+_expand:21> [[ _main_complete == _prefix ]]
+_expand:24> word=+ 
+_expand:29> [[  == *c* ]]
+_expand:30> zstyle -s :completion::expand::: completions expr
+_expand:39> exp=( + ) 
+_expand:45> [[  == *s* ]]
+_expand:46> zstyle -s :completion::expand::: substitute expr
+_expand:47> [[ :expand:: == expand-word:* ]]
+_expand:52> exp=( + ) 
+_expand:57> ((  1  ))
+_expand:59> subd=( + ) 
+_expand:63> [[  == *g* ]]
+_expand:64> zstyle -s :completion::expand::: glob expr
+_expand:65> [[ :expand:: == expand-word:* ]]
+_expand:72> ((  1  ))
+_expand:74> [[ 1 -eq 1 && + == +(|(N)) ]]
+_expand:74> return 1
+_main_complete:146> ((  _matcher_num++  ))
+_main_complete:148> ((  _completer_num++  ))
+_main_complete:117> tmp=_complete
+_main_complete:119> [[ -n  ]]
+_main_complete:121> [[ _complete == *:-* ]]
+_main_complete:124> [[ _complete == *:* ]]
+_main_complete:128> _completer=complete 
+_main_complete:130> curcontext=:complete:: 
+_main_complete:132> zstyle -a :completion::complete::: matcher-list _matchers
+_main_complete:133> _matchers=(  ) 
+_main_complete:135> _matcher_num=1 
+_main_complete:136> _matcher=
+_main_complete:137> [[ -n  ]]
+_main_complete:142> _complete
+_complete:7> local comp name oldcontext
+_complete:8> typeset -T curcontext=:complete:: ccarray
+_complete:10> oldcontext=:complete:: 
+_complete:14> [[ -n  ]]
+_complete:25> comp=_first 
+_complete:26> [[ ! -z _first ]]
+_complete:27> ccarray[3]=-first- 
+_complete:28> _first
+_complete:29> [[  == all ]]
+_complete:39> [[ -n  ]]
+_complete:43> [[ command == command ]]
+_complete:44> curcontext=:complete:: 
+_complete:45> _normal -s
+_normal:3> local comp command cmd1 cmd2 pat val name i ret=1 _compskip=
+_normal:4> local curcontext=:complete::
+_normal:11> [[ -s == -s ]]
+_normal:17> command=mutt 
+_normal:18> [[ CURRENT -eq 1 ]]
+_normal:26> [[ m == = ]]
+_normal:30> [[ mutt == */* ]]
+_normal:35> cmd1=mutt 
+_normal:36> cmd2= 
+_normal:37> curcontext=:complete:mutt: 
+_normal:43> [[  != (all|*patterns*) ]]
+_normal:66> name=mutt 
+_normal:67> comp=_mutt 
+_normal:69> [[ -z _mutt ]]
+_normal:73> [[ -n _mutt ]]
+_normal:74> _compskip=patterns 
+_normal:75> _mutt
+_mutt:3> local curcontext=:complete:mutt: state line ret=1
+_mutt:4> typeset -A opt_args
+_mutt:6> _arguments -C ::recipient:->userhost -a:MIME attachment:_files -b:BCC recipient:->userhost -c:CC recipient:->userhost -e:post-init configuration: -f+:mailbox: _mailboxes -F+:init file:_files -h+:help: -H+:draft file:_files -i:include file:_files -m+:default mailbox type:(mbox MMDF MH Maildir) -n+:bypass system configuration: -p+:resume postponed message: -R+:open in read-only mode: -s+:subject: -v+:version: -x+:emulate mailx compose: -y+:start listing mailboxes: -z+:start only if new messages: -Z+:open first mailbox with new mail:
+_arguments:6> local long cmd=mutt descr mesg subopts opt usecc autod
+_arguments:7> local oldcontext=:complete:mutt: hasopts
+_arguments:9> long=0 
+_arguments:10> ((  long  ))
+_arguments:157> subopts=( ) 
+_arguments:158> [[ -C == -(O*|C) ]]
+_arguments:159> case -C (-C)
+_arguments:160> usecc=yes 
+_arguments:160> shift
+_arguments:158> [[ ::recipient:->userhost == -(O*|C) ]]
+_arguments:166> zstyle -s :completion::complete:mutt::options auto-description autod
+_arguments:168> ((  20  ))
+_arguments:168> comparguments -i  ::recipient:->userhost -a:MIME attachment:_files -b:BCC recipient:->userhost -c:CC recipient:->userhost -e:post-init configuration: -f+:mailbox: _mailboxes -F+:init file:_files -h+:help: -H+:draft file:_files -i:include file:_files -m+:default mailbox type:(mbox MMDF MH Maildir) -n+:bypass system configuration: -p+:resume postponed message: -R+:open in read-only mode: -s+:subject: -v+:version: -x+:emulate mailx compose: -y+:start listing mailboxes: -z+:start only if new messages: -Z+:open first mailbox with new mail:
+_arguments:169> local action noargs aret expl local tried
+_arguments:170> local next direct odirect equal single matcher matched ws tmp1 tmp2 tmp3
+_arguments:171> local opts subc tc prefix suffix descrs actions subcs anum
+_arguments:172> local origpre=+ origipre= nm=0
+_arguments:174> comparguments -D descrs actions subcs
+_arguments:175> comparguments -O next direct odirect equal
+_arguments:179> _tags option-f-1
+_tags:3> local prev
+_tags:10> [[ option-f-1 == -- ]]
+_tags:15> ((  1  ))
+_tags:19> local curcontext=:complete:mutt: order tag nodef tmp
+_tags:21> [[ option-f-1 == -C?* ]]
+_tags:24> [[ option-f-1 == -C ]]
+_tags:28> targs=( ) 
+_tags:31> [[ option-f-1 == -(|-) ]]
+_tags:33> zstyle -a :completion::complete:mutt:: group-order order
+_tags:48> comptags -i :complete:mutt: option-f-1
+_tags:52> [[ -n  ]]
+_tags:55> zstyle -a :completion::complete:mutt:: tag-order order
+_tags:56> order=( (|*-)argument-* (|*-)option-* values options ) 
+_tags:58> tag=(|*-)argument-* (|*-)option-* values
+_tags:59> case (|*-)argument-* (|*-)option-* values (-)
+_tags:59> case (|*-)argument-* (|*-)option-* values (*())
+_tags:59> case (|*-)argument-* (|*-)option-* values (!*)
+_tags:59> case (|*-)argument-* (|*-)option-* values (?*)
+_tags:67> comptry -m (|*-)argument-* (|*-)option-* values
+_tags:58> tag=options
+_tags:59> case options (-)
+_tags:59> case options (*())
+_tags:59> case options (!*)
+_tags:59> case options (?*)
+_tags:67> comptry -m options
+_tags:71> [[ -z  ]]
+_tags:71> comptry option-f-1
+_tags:76> comptags -T
+_tags:78> return
+_arguments:199> comparguments -M matcher
+_arguments:201> context=( ) 
+_arguments:202> state=( ) 
+_arguments:204> true
+_arguments:205> _tags
+_tags:3> local prev
+_tags:10> [[  == -- ]]
+_tags:15> ((  0  ))
+_tags:83> comptags -N
+_arguments:206> anum=1 
+_arguments:207> [[ anum -le 1 ]]
+_arguments:209> action= _mailboxes 
+_arguments:210> descr=mailbox 
+_arguments:211> subc=option-f-1 
+_arguments:213> [[ -n  ]]
+_arguments:213> _requested option-f-1
+_requested:3> local __gopt=-J
+_requested:5> [[ option-f-1 == -([12]|)[VJ] ]]
+_requested:10> comptags -R option-f-1
+_requested:11> [[ 1 -gt 3 ]]
+_requested:13> [[ 1 -gt 1 ]]
+_requested:16> return 0
+_arguments:215> curcontext=:complete:mutt:option-f-1 
+_arguments:217> _description option-f-1 expl mailbox
+_description:3> local name gropt=-J format gname hidden hide match opts
+_description:5> opts=( ) 
+_description:7> [[ option-f-1 == -([12]|)[VJ] ]]
+_description:12> _lastdescr=(  mailbox ) 
+_description:14> _setup option-f-1
+_setup:3> local val nm=0
+_setup:5> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 list-colors val
+_setup:6> zmodload -i zsh/complist
+_setup:7> [[ option-f-1 == default ]]
+_setup:10> eval ZLS_COLORS="(option-f-1)${(j.:(option-f-1).)${(@)val:gs/:/\\:}}:${ZLS_COLORS}"
+_setup:10> ZLS_COLORS=(option-f-1): 
+_setup:21> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 list-packed
+_setup:23> [[ 2 -eq 1 ]]
+_setup:26> compstate[list]=ambiguous 
+_setup:29> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 list-rows-first
+_setup:31> [[ 2 -eq 1 ]]
+_setup:34> compstate[list]=ambiguous 
+_setup:37> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 last-prompt
+_setup:39> [[ 2 -eq 1 ]]
+_setup:42> compstate[last_prompt]=yes 
+_setup:45> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 accept-exact
+_setup:47> [[ 2 -eq 1 ]]
+_setup:50> compstate[exact]= 
+_setup:53> [[ _last_nmatches -ge 0 ]]
+_setup:56> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 menu val
+_setup:60> _last_nmatches=-1 
+_setup:63> [[  != always ]]
+_setup:64> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 force-list val
+_description:16> name=expl 
+_description:18> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 format format
+_description:19> zstyle -s :completion::complete:mutt:option-f-1:descriptions format format
+_description:21> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 hidden hidden
+_description:26> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 group-name gname
+_description:28> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 matcher match
+_description:30> [[ -n  ]]
+_description:32> [[ -z  ]]
+_description:33> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 ignored-patterns _comp_ignore
+_description:37> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 ignore-line
+_description:40> _comp_ignore=( ) 
+_description:46> shift 2
+_description:47> [[ -n  ]]
+_description:49> [[ -n  ]]
+_description:56> [[ -n  ]]
+_description:59> set -A expl -J -default-
+_description:63> return 0
+_arguments:219> [[  _mailboxes == = * ]]
+_arguments:225> [[  _mailboxes == ->* ]]
+_arguments:239> [[ -z  ]]
+_arguments:240> local line
+_arguments:241> typeset -A opt_args
+_arguments:242> local=yes 
+_arguments:245> comparguments -W line opt_args
+_arguments:247> [[  _mailboxes ==  # ]]
+_arguments:255> [[  _mailboxes == ((*)) ]]
+_arguments:264> [[  _mailboxes == (*) ]]
+_arguments:271> [[  _mailboxes == {*} ]]
+_arguments:279> [[  _mailboxes ==  * ]]
+_arguments:283> eval action=(  _mailboxes )
+_arguments:283> action=( _mailboxes ) 
+_arguments:284> _next_label option-f-1 expl mailbox
+_next_label:3> local __gopt=-J __descr __spec
+_next_label:5> [[ option-f-1 == -([12]|)[VJ] ]]
+_next_label:10> comptags -A option-f-1 curtag __spec
+_next_label:11> _comp_tags= option-f-1  
+_next_label:12> [[ option-f-1 == *:* ]]
+_next_label:18> _description -J option-f-1 expl mailbox
+_description:3> local name gropt=-J format gname hidden hide match opts
+_description:5> opts=( ) 
+_description:7> [[ -J == -([12]|)[VJ] ]]
+_description:8> gropt=-J 
+_description:9> shift
+_description:12> _lastdescr=(  mailbox mailbox ) 
+_description:14> _setup option-f-1
+_setup:3> local val nm=0
+_setup:5> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 list-colors val
+_setup:6> zmodload -i zsh/complist
+_setup:7> [[ option-f-1 == default ]]
+_setup:10> eval ZLS_COLORS="(option-f-1)${(j.:(option-f-1).)${(@)val:gs/:/\\:}}:${ZLS_COLORS}"
+_setup:10> ZLS_COLORS=(option-f-1):(option-f-1): 
+_setup:21> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 list-packed
+_setup:23> [[ 2 -eq 1 ]]
+_setup:26> compstate[list]=ambiguous 
+_setup:29> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 list-rows-first
+_setup:31> [[ 2 -eq 1 ]]
+_setup:34> compstate[list]=ambiguous 
+_setup:37> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 last-prompt
+_setup:39> [[ 2 -eq 1 ]]
+_setup:42> compstate[last_prompt]=yes 
+_setup:45> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 accept-exact
+_setup:47> [[ 2 -eq 1 ]]
+_setup:50> compstate[exact]= 
+_setup:53> [[ _last_nmatches -ge 0 ]]
+_setup:56> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 menu val
+_setup:60> _last_nmatches=-1 
+_setup:63> [[  != always ]]
+_setup:64> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 force-list val
+_description:16> name=expl 
+_description:18> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 format format
+_description:19> zstyle -s :completion::complete:mutt:option-f-1:descriptions format format
+_description:21> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 hidden hidden
+_description:26> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 group-name gname
+_description:28> zstyle -s :completion::complete:mutt:option-f-1:option-f-1 matcher match
+_description:30> [[ -n  ]]
+_description:32> [[ -z  ]]
+_description:33> zstyle -a :completion::complete:mutt:option-f-1:option-f-1 ignored-patterns _comp_ignore
+_description:37> zstyle -t :completion::complete:mutt:option-f-1:option-f-1 ignore-line
+_description:40> _comp_ignore=( ) 
+_description:46> shift 2
+_description:47> [[ -n  ]]
+_description:49> [[ -n  ]]
+_description:56> [[ -n  ]]
+_description:59> set -A expl -J -default-
+_description:63> return 0
+_next_label:19> set -A expl -J -default-
+_next_label:22> return 0
+_arguments:285> _mailboxes
+_mailboxes:2> local expl ret=1
+_mailboxes:3> local pinedirectory=~/mail
+_mailboxes:4> local maildirectory=/home/slipcon/Mail
+_mailboxes:6> ((  ! 1  ))
+_mailboxes:10> case :complete:mutt:option-f-1 (*:mail:*)
+_mailboxes:10> case :complete:mutt:option-f-1 (*:(mush|zmail|zmlite):*)
+_mailboxes:10> case :complete:mutt:option-f-1 (*:pine:*)
+_mailboxes:10> case :complete:mutt:option-f-1 (*)
+_mailboxes:32> [[ + == (|-f)+* ]]
+_mailboxes:33> _tags mailboxes
+_tags:3> local prev
+_tags:10> [[ mailboxes == -- ]]
+_tags:15> ((  1  ))
+_tags:19> local curcontext=:complete:mutt:option-f-1 order tag nodef tmp
+_tags:21> [[ mailboxes == -C?* ]]
+_tags:24> [[ mailboxes == -C ]]
+_tags:28> targs=( ) 
+_tags:31> [[ mailboxes == -(|-) ]]
+_tags:33> zstyle -a :completion::complete:mutt:option-f-1: group-order order
+_tags:48> comptags -i :complete:mutt:option-f-1 mailboxes
+_tags:52> [[ -n  ]]
+_tags:55> zstyle -a :completion::complete:mutt:option-f-1: tag-order order
+_tags:56> order=( (|*-)argument-* (|*-)option-* values options ) 
+_tags:58> tag=(|*-)argument-* (|*-)option-* values
+_tags:59> case (|*-)argument-* (|*-)option-* values (-)
+_tags:59> case (|*-)argument-* (|*-)option-* values (*())
+_tags:59> case (|*-)argument-* (|*-)option-* values (!*)
+_tags:59> case (|*-)argument-* (|*-)option-* values (?*)
+_tags:67> comptry -m (|*-)argument-* (|*-)option-* values
+_tags:58> tag=options
+_tags:59> case options (-)
+_tags:59> case options (*())
+_tags:59> case options (!*)
+_tags:59> case options (?*)
+_tags:67> comptry -m options
+_tags:71> [[ -z  ]]
+_tags:71> comptry mailboxes
+_tags:76> comptags -T
+_tags:78> return
+_mailboxes:39> _tags
+_tags:3> local prev
+_tags:10> [[  == -- ]]
+_tags:15> ((  0  ))
+_tags:83> comptags -N
+_mailboxes:40> _requested mailboxes expl mailbox specification _mua_mailboxes
+_requested:3> local __gopt=-J
+_requested:5> [[ mailboxes == -([12]|)[VJ] ]]
+_requested:10> comptags -R mailboxes
+_requested:11> [[ 4 -gt 3 ]]
+_requested:12> _all_labels - -J mailboxes expl mailbox specification _mua_mailboxes
+_all_labels:3> local __gopt=-J __len __tmp __pre __suf __ret=1 __descr __spec __prev
+_all_labels:5> [[ - == - ]]
+_all_labels:6> __prev=- 
+_all_labels:7> shift
+_all_labels:10> [[ -J == -([12]|)[VJ] ]]
+_all_labels:11> __gopt=-J 
+_all_labels:12> shift
+_all_labels:15> __tmp=5 
+_all_labels:16> __len=4 
+_all_labels:17> [[ __tmp -lt __len ]]
+_all_labels:20> [[ __tmp -eq 4 ]]
+_all_labels:24> __pre=4 
+_all_labels:25> __suf=5 
+_all_labels:28> comptags -A- mailboxes curtag __spec
+_all_labels:29> _comp_tags= option-f-1  mailboxes  
+_all_labels:30> [[ mailboxes == *:* ]]
+_all_labels:37> _description -J mailboxes expl mailbox specification
+_description:3> local name gropt=-J format gname hidden hide match opts
+_description:5> opts=( ) 
+_description:7> [[ -J == -([12]|)[VJ] ]]
+_description:8> gropt=-J 
+_description:9> shift
+_description:12> _lastdescr=(  mailbox mailbox specification ) 
+_description:14> _setup mailboxes
+_setup:3> local val nm=0
+_setup:5> zstyle -a :completion::complete:mutt:option-f-1:mailboxes list-colors val
+_setup:6> zmodload -i zsh/complist
+_setup:7> [[ mailboxes == default ]]
+_setup:10> eval ZLS_COLORS="(mailboxes)${(j.:(mailboxes).)${(@)val:gs/:/\\:}}:${ZLS_COLORS}"
+_setup:10> ZLS_COLORS=(mailboxes):(option-f-1):(option-f-1): 
+_setup:21> zstyle -t :completion::complete:mutt:option-f-1:mailboxes list-packed
+_setup:23> [[ 2 -eq 1 ]]
+_setup:26> compstate[list]=ambiguous 
+_setup:29> zstyle -t :completion::complete:mutt:option-f-1:mailboxes list-rows-first
+_setup:31> [[ 2 -eq 1 ]]
+_setup:34> compstate[list]=ambiguous 
+_setup:37> zstyle -t :completion::complete:mutt:option-f-1:mailboxes last-prompt
+_setup:39> [[ 2 -eq 1 ]]
+_setup:42> compstate[last_prompt]=yes 
+_setup:45> zstyle -t :completion::complete:mutt:option-f-1:mailboxes accept-exact
+_setup:47> [[ 2 -eq 1 ]]
+_setup:50> compstate[exact]= 
+_setup:53> [[ _last_nmatches -ge 0 ]]
+_setup:56> zstyle -a :completion::complete:mutt:option-f-1:mailboxes menu val
+_setup:60> _last_nmatches=-1 
+_setup:63> [[  != always ]]
+_setup:64> zstyle -s :completion::complete:mutt:option-f-1:mailboxes force-list val
+_description:16> name=expl 
+_description:18> zstyle -s :completion::complete:mutt:option-f-1:mailboxes format format
+_description:19> zstyle -s :completion::complete:mutt:option-f-1:descriptions format format
+_description:21> zstyle -s :completion::complete:mutt:option-f-1:mailboxes hidden hidden
+_description:26> zstyle -s :completion::complete:mutt:option-f-1:mailboxes group-name gname
+_description:28> zstyle -s :completion::complete:mutt:option-f-1:mailboxes matcher match
+_description:30> [[ -n  ]]
+_description:32> [[ -z  ]]
+_description:33> zstyle -a :completion::complete:mutt:option-f-1:mailboxes ignored-patterns _comp_ignore
+_description:37> zstyle -t :completion::complete:mutt:option-f-1:mailboxes ignore-line
+_description:40> _comp_ignore=( ) 
+_description:46> shift 2
+_description:47> [[ -n  ]]
+_description:49> [[ -n  ]]
+_description:56> [[ -n  ]]
+_description:59> set -A expl -J -default-
+_description:63> return 0
+_all_labels:39> _mua_mailboxes -J -default-
+_mua_mailboxes:3> local -a mbox_short
+_mua_mailboxes:4> local -aU mbox_names
+_mua_mailboxes:5> local ret=1
+_mua_mailboxes:7> case :complete:mutt:option-f-1 (*:elm:*)
+_mua_mailboxes:7> case :complete:mutt:option-f-1 (*:mail:*)
+_mua_mailboxes:7> case :complete:mutt:option-f-1 (*:mh:*)
+_mua_mailboxes:7> case :complete:mutt:option-f-1 (*:mush:*)
+_mua_mailboxes:7> case :complete:mutt:option-f-1 (*:mutt:*)
+_mua_mailboxes:35> mbox_names=( /var/mail/slipcon ) 
+_mua_mailboxes:37> mbox_short=( ! < > ) 
+_mua_mailboxes:65> ((  1  ))
+_mua_mailboxes:65> _multi_parts -J -default- / mbox_names
+_multi_parts:10> local sep matches pref npref i tmp1 group expl menu pre suf opre osuf cpre
+_multi_parts:11> local opts sopts matcher imm
+_multi_parts:12> typeset -U tmp2
+_multi_parts:16> zparseopts -D -a sopts J+:=group V+:=group X+:=expl P:=opts F:=opts S: r: R: q 1 2 n f M+:=matcher i=imm
+_multi_parts:20> sopts=( ) 
+_multi_parts:21> ((  0  ))
+_multi_parts:24> matcher= 
+_multi_parts:32> sep=/ 
+_multi_parts:33> [[ m == ( ]]
+_multi_parts:36> matches=( /var/mail/slipcon ) 
+_multi_parts:43> pre=+ 
+_multi_parts:44> suf= 
+_multi_parts:45> opre=+ 
+_multi_parts:46> osuf= 
+_multi_parts:47> orig=+ 
+_multi_parts:51> [[ automenu-unambiguous == (*menu|[0-9]*) || -n  || 0 -ne 0 ]]
+_multi_parts:57> pref= 
+_multi_parts:62> compadd -O tmp1 -M r:|/=* r:|=*  -a matches
+_multi_parts:64> ((  0  ))
+_multi_parts:66> true
+_multi_parts:70> [[ + == */* ]]
+_multi_parts:74> PREFIX=+ 
+_multi_parts:75> SUFFIX= 
+_multi_parts:83> [[ -n + ]]
+_multi_parts:84> tmp1=( ) 
+_multi_parts:89> ((  0  ))
+_multi_parts:94> compadd -O tmp1 - 
+_multi_parts:96> [[ 0 -eq 0 && -n  ]]
+_multi_parts:99> tmp2=( ) 
+_multi_parts:101> [[ 0 -eq 1 ]]
+_multi_parts:133> ((  0  ))
+_multi_parts:209> zstyle -t :completion::complete:mutt:option-f-1: expand prefix
+_multi_parts:210> return 1
+_mua_mailboxes:66> ((  3  ))
+_mua_mailboxes:66> compadd -J -default- -a mbox_short
+_mua_mailboxes:67> return ret
+_all_labels:28> comptags -A- mailboxes curtag __spec
+_all_labels:43> return __ret
+_requested:12> return 1
+_mailboxes:42> _requested files expl mailbox file
+_requested:3> local __gopt=-J
+_requested:5> [[ files == -([12]|)[VJ] ]]
+_requested:10> comptags -R files
+_requested:18> return 1
+_mailboxes:47> ((  ret  ))
+_mailboxes:39> _tags
+_tags:3> local prev
+_tags:10> [[  == -- ]]
+_tags:15> ((  0  ))
+_tags:83> comptags -N
+_mailboxes:50> return 1
+_arguments:284> _next_label option-f-1 expl mailbox
+_next_label:3> local __gopt=-J __descr __spec
+_next_label:5> [[ option-f-1 == -([12]|)[VJ] ]]
+_next_label:10> comptags -A option-f-1 curtag __spec
+_next_label:25> return 1
+_arguments:287> tried=yes 
+_arguments:207> [[ anum -le 1 ]]
+_arguments:302> [[ -z  ]]
+_arguments:302> _requested options
+_requested:3> local __gopt=-J
+_requested:5> [[ options == -([12]|)[VJ] ]]
+_requested:10> comptags -R options
+_requested:18> return 1
+_arguments:345> [[ -n yes && + != [-+]* ]]
+_arguments:205> _tags
+_tags:3> local prev
+_tags:10> [[  == -- ]]
+_tags:15> ((  0  ))
+_tags:83> comptags -N
+_arguments:347> [[ -n  ]]
+_arguments:373> break
+_arguments:376> [[ -z  ]]
+_arguments:376> curcontext=:complete:mutt: 
+_arguments:378> [[ -n  ]]
+_arguments:380> [[ -n  ]]
+_arguments:384> [[ nm -ne 0 ]]
+_mutt:28> [[  == userhost ]]
+_mutt:38> return ret
+_normal:76> [[ patterns == (all|*patterns*) ]]
+_normal:76> return ret
+_complete:68> _compskip= 
+_complete:70> ((  compstate[nmatches]  ))
+_main_complete:146> ((  _matcher_num++  ))
+_main_complete:148> ((  _completer_num++  ))
+_main_complete:151> curcontext=::: 
+_main_complete:152> nm=0 
+_main_complete:154> [[  == keep || nm -gt 1 ]]
+_main_complete:223> [[ nm -le 1 && -n  ]]
+_main_complete:226> [[ nm -eq 0 && 3 -ne 0 &&  != keep ]]
+_main_complete:228> zstyle -s :completion:::::warnings format format
+_main_complete:252> [[  == always ||  == ?* ]]
+_main_complete:256> [[  == keep ]]
+_main_complete:260> funcs=( ) 
+_main_complete:261> comppostfuncs=( ) 
+_main_complete:266> _lastcomp=( list_lines 0 all_quotes \ nmatches 0 restore auto context command vared  unambiguous  list_max 100 unambiguous_cursor 1 list ambiguous exact  to_end match last_prompt yes pattern_insert menu ignored 0 insert automenu-unambiguous ) 
+_main_complete:267> _lastcomp[nmatches]=0 
+_main_complete:268> _lastcomp[completer]=complete 
+_main_complete:269> _lastcomp[prefix]=+ 
+_main_complete:270> _lastcomp[suffix]= 
+_main_complete:271> _lastcomp[iprefix]= 
+_main_complete:272> _lastcomp[isuffix]= 
+_main_complete:273> _lastcomp[qiprefix]= 
+_main_complete:274> _lastcomp[qisuffix]= 
+_main_complete:275> _lastcomp[tags]= option-f-1  mailboxes  
+_main_complete:277> return ret
+_complete_debug:17> integer ret=1
+_complete_debug:18> unsetopt xtrace

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

* Re: new completion modifications
  2001-03-22 16:28     ` Scott Lipcon
@ 2001-03-22 21:08       ` Bart Schaefer
  2001-03-22 21:50         ` Scott Lipcon
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2001-03-22 21:08 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 22, 11:28am, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} > maildirectory=~/rootOfYourMHfolderTree
} > 
} > That should probably be converted to use a zstyle.
} 
} % echo $maildirectory
} /home/slipcon/Mail
} % mutt -f +inb<tab>
} (nothing happens)

Try typing

% mutt -f +inb<C-x?>

Control-x question-mark is bound to _complete_debug, which will dump a
trace of what the completion functions are doing into a temp file.

You're looking to see what gets put into the _mh_cache array parameter.

What's your $ZSH_VERSION, again?

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-22 10:00 Sven Wischnowsky
  2001-03-22 15:34 ` Scott Lipcon
@ 2001-03-22 16:58 ` Bart Schaefer
  1 sibling, 0 replies; 17+ messages in thread
From: Bart Schaefer @ 2001-03-22 16:58 UTC (permalink / raw)
  To: zsh-users

On Mar 22, 11:00am, Sven Wischnowsky wrote:
} Subject: Re: new completion modifications
}
} (I thought that were some script in the distribution helping to build
} the directory structure the `path' style needs, but I can't find it
} anymore.)

    Misc/make-zsh-urls

(That's the top-level Misc, and -not- Functions/Misc.)

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-22 16:01   ` Bart Schaefer
@ 2001-03-22 16:28     ` Scott Lipcon
  2001-03-22 21:08       ` Bart Schaefer
  0 siblings, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-22 16:28 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

> 
> maildirectory=~/rootOfYourMHfolderTree
> 
> That should probably be converted to use a zstyle.

This doesn't seem to work.  I put:

[[ -d $HOME/Mail ]] && maildirectory=$HOME/Mail

in my .zshrc, before I do compinit, so _mutt and _mailboxes should have
it defined.

% echo $maildirectory
/home/slipcon/Mail
% mutt -f +inb<tab>
(nothing happens)
% scan +inb<tab>
(completes to +inbox/)


Any ideas?
Thanks for the help,

Scott 



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

* Re: new completion modifications
  2001-03-22 15:34 ` Scott Lipcon
@ 2001-03-22 16:01   ` Bart Schaefer
  2001-03-22 16:28     ` Scott Lipcon
  0 siblings, 1 reply; 17+ messages in thread
From: Bart Schaefer @ 2001-03-22 16:01 UTC (permalink / raw)
  To: Scott Lipcon; +Cc: zsh-users

On Mar 22, 10:34am, Scott Lipcon wrote:
} Subject: Re: new completion modifications
}
} 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.

_mailboxes most certainly does know about mh folders.  The _mh function
could probably be modified to call _mailboxes, too, except that support
in _mailboxes for mh has always been marked as "wrong or incomplete" --
I know there are at least a couple of dozen commands that use MH folders,
because of the way MH is architected, but I no longer have access to a
complete MH installation (and refuse to clutter my home machine with one
just to learn the current list of commands, sorry).

To get _mutt to complete MH folders, you just need this in .zshrc:

maildirectory=~/rootOfYourMHfolderTree

That should probably be converted to use a zstyle.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: new completion modifications
  2001-03-22 10:00 Sven Wischnowsky
@ 2001-03-22 15:34 ` Scott Lipcon
  2001-03-22 16:01   ` Bart Schaefer
  2001-03-22 16:58 ` Bart Schaefer
  1 sibling, 1 reply; 17+ messages in thread
From: Scott Lipcon @ 2001-03-22 15:34 UTC (permalink / raw)
  To: Sven Wischnowsky; +Cc: zsh-users, slipcon

> > $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


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

* Re: new completion modifications
@ 2001-03-22 10:00 Sven Wischnowsky
  2001-03-22 15:34 ` Scott Lipcon
  2001-03-22 16:58 ` Bart Schaefer
  0 siblings, 2 replies; 17+ messages in thread
From: Sven Wischnowsky @ 2001-03-22 10:00 UTC (permalink / raw)
  To: zsh-users


Scott Lipcon wrote:

> I just upgraded from 3.0.x to a 3.1.9 version, and I'm starting to tweak the 
> new completions to work the way I like.  I have a few questions that I hope 
> aren't too basic.
> 
> Before, I had a few variables defined:
> 
> $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 ? ;-)

> ...
> 
> I've got this mostly working by simply doing:
> 
> 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.

(I thought that were some script in the distribution helping to build
the directory structure the `path' style needs, but I can't find it
anymore.)

> Second, is there an easy way to limit my $hosts expansions to telnet, rlogin, 
> ftp, etc, and $sshhosts to ssh, scp, etc?  using the above zstyles, they are 
> all thrown in one completion basket.

Lots.  First, see the description of the `my-accounts' and
`other-accounts' tags and the `users-hosts' and `users-hosts-ports'
styles.

And then learn to make use of the first argument of `zstyle': it's a
pattern matching the context string in which the style should be used.
That string is described at the beginning of the `Completion System
Configuration' section.  Inter alia it contains the name of the
current command, so you could use:

  zstyle ':completion:*:*:ssh:*' hosts ...

to specify the host names to use for `ssh'.  Or:

  zstyle ':completion:*:*:(ssh|scp):*' hosts ...

for the hosts to use for both `ssh' and `scp'.

[see also Adam's message zsh-users:3692 ]

> Lastly, the default _rlogin  completion file doesn't work for me - we use the 
> kerberized version of rlogin, which takes the -x option:
> 
> % rlogin host<tab>
> 
> completes properly, as does rlogin -l user host<tab>.
> 
> however, 
> 
> % rlogin -x host<tab>  
> 
> does nothing.  
> 
> How can I add the -x flag to the rlogin completion definition, without 
> modifying the system file?  (kerberized rlogin seems to have lots of other 
> options that also aren't included - I only use -x however)

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

  _rlogin () {
    case "$service" in
    rlogin)
      _arguments -s \
        '-8[allow 8-Bit data]' \
        '-e-[specify escape character]:escape character:' \
        '-l[specify login user name]:login as:_rlogin_users' \
        ':remote host name:_rlogin_hosts'
      ;;

That part describes completion for `rlogin'.  Now just stick a line
describing the `-x' option into it, e.g.:

  _rlogin () {
    case "$service" in
    rlogin)
      _arguments -s \
        '-x[some kerberos thing]' \
        ...                          # the rest as in the original

Then put that modified function in your private zsh function directory 
and make sure it is before the standard completion directories in your
$fpath.  Then it will be automatically be used instead of the standard 
one.

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.


To -workers: for some commands (including `rlogin', I think) we could
make the completion function more tolerant by adding `-A "-*"'s to the 
calls to _arguments.

Bye
 Sven


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


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

end of thread, other threads:[~2001-03-24 17:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-22  3:58 new completion modifications Scott Lipcon
2001-03-22 10:21 ` Oliver Kiddle
2001-03-22 10:00 Sven Wischnowsky
2001-03-22 15:34 ` Scott Lipcon
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
2001-03-23 14:07 Sven Wischnowsky

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