zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: man completion and zftp problem
Date: Wed, 15 Sep 1999 16:04:36 +0100	[thread overview]
Message-ID: <37DFB584.506608BA@u.genie.co.uk> (raw)

The man completion is also useful for whatis and apropos. I was going
to save this patch until I had a load more completion patches but I've
not had the time to do any more. Strictly speaking, apropos should
complete to words taken from all the whatis files but in the absence of
that, the same completion as man is useful.

Also below is my compdef completion which I wrote ages ago and never
finished. It probably needs a bit of tidying up, finishing and adjusting
to use other new functions like _arguments but until then, it's useful
as it is.

Finally, an unrelated thing which I have recently observed. If I use
zfgoto to connect to an ftp site from my bookmarks and accidentally type
the wrong password, the module saves my incorrect password in memory so,
I then have to unload and reload the module before I can connect to the
ftp site.

Oliver Kiddle


#compdef compdef

local func base=2

while [[ $words[base] = -* ]]; do
  case $words[base] in
    -d) delete=yes ;;
    -p) type=pattern ;;
    -k) type=key ;;
  esac  
  (( base++ ))
done

if [ "$delete" ]; then
  compadd ${(k)_comps}
else
  if [[ CURRENT -eq base  ]]; then
    for func in ${^~fpath:/.}/_(|*[^~])(N:t); compadd -P_ - ${func#_}
  else
    compgen -c
  fi
fi


*** Completion/User/_man.old	Wed Sep 15 15:30:16 1999
--- Completion/User/_man	Wed Sep 15 15:30:40 1999
***************
*** 1,4 ****
! #compdef man
  
  setopt localoptions rcexpandparam
  
--- 1,4 ----
! #compdef man apropos whatis
  
  setopt localoptions rcexpandparam


             reply	other threads:[~1999-09-15 15:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-15 15:04 Oliver Kiddle [this message]
1999-09-15 14:56 ` Peter Stephenson

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=37DFB584.506608BA@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.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).