1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 05:53:52 +01:00

Unify completion for ncftp and lftp in _ncftp

This commit is contained in:
Bart Schaefer 2001-03-13 18:13:17 +00:00
parent c925a15aa7
commit 467ad8e65b
4 changed files with 13 additions and 10 deletions

@ -1,3 +1,8 @@
2001-03-13 Bart Schaefer <schaefer@zsh.org>
* 13613, 13620: Completion/User/_ncftp, Completion/User/_lftp:
Unify completion for ncftp and lftp in _ncftp (removed _lftp).
2001-03-13 Peter Stephenson <pws@csr.com>
* 13611, 13615: Doc/Zsh/zle.yo, Src/init.c, Src/zsh.h,

@ -6,7 +6,7 @@ DISTFILES_SRC='
_enscript _find _finger _fakeroot _fetchmail _flex
_gcc _gdb _getconf _gprof _grep _groups _gs _gv _gzip
_hosts _imagemagick _iconv _init_d _ispell
_java _joe _killall _lftp _look _lp _ls _lynx _lzop
_java _joe _killall _look _lp _ls _lynx _lzop
_mailboxes _make _man _mere _mh _mount _mutt _my_accounts _mysql_utils
_ncftp _nedit _netscape _newsgroups _nslookup _other_accounts
_pack _patch _pbm _pdf _perl _perl_basepods _perl_builtin_funcs

@ -1,5 +0,0 @@
#compdef lftp
if [[ -f ~/.lftp/bookmarks ]]; then
_wanted bookmarks expl bookmark \
compadd - $(cut -f1 ~/.lftp/bookmarks) && return 0
fi

@ -1,8 +1,11 @@
#compdef ncftp
#compdef ncftp lftp
if [[ -f ~/.ncftp/bookmarks ]]; then
_wanted bookmarks expl bookmark \
compadd - $(awk -F, 'NR > 2 { print $1 }' ~/.ncftp/bookmarks) && return 0
local bookmarks=$HOME/.$service/bookmarks
if [[ -f $bookmarks ]]; then
bookmarks=(${"${(f)$(<$bookmarks)}"%%[[:space:],]*})
[[ $service == ncftp ]] && shift 2 bookmarks
_wanted bookmarks expl bookmark compadd -a bookmarks && return 0
fi
_hosts