summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Completion/User/.distfiles4
-rw-r--r--Completion/User/_netscape4
-rw-r--r--Completion/User/_newsgroups9
-rw-r--r--Completion/User/_tin2
5 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d52332ec7..63336337f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2001-02-08 Oliver Kiddle <opk@zsh.org>
+ * 13448: Completion/User/.distfiles, Completion/User/_tin,
+ Completion/User/_netscape, Completion/User/_newsgroups:
+ add newsgroup completion
+
* 13445: Completion/User/_gzip: fix to work for zcat again
2001-02-07 Bart Schaefer <schaefer@zsh.org>
diff --git a/Completion/User/.distfiles b/Completion/User/.distfiles
index d6abd4e1e..6d88112c0 100644
--- a/Completion/User/.distfiles
+++ b/Completion/User/.distfiles
@@ -7,12 +7,12 @@ DISTFILES_SRC='
_gs _gv _gzip _hosts _imagemagick _ispell
_java _joe _killall _lp _look _lynx _lzop
_mailboxes _make _man _mere _mh _mount _mutt _my_accounts _mysql_utils
- _nedit _netscape _nslookup _other_accounts
+ _nedit _netscape _newsgroups _nslookup _other_accounts
_pack _patch _pbm _pdf _perl _perl_basepods _perl_builtin_funcs
_perl_modules _perldoc _ports _prcs _printers _prompt _ps _pspdf
_psutils _rcs _rlogin
_sh _slrn _socket _ssh _strip _stty _su _sudo
- _tar _tar_archive _telnet _tex _texi _tiff _tilde_files
+ _tar _tar_archive _telnet _tex _texi _tiff _tilde_files _tin
_urls _use_lo _user_at_host _users _users_on
_webbrowser _wget _whereis _whois _xargs _yodl _yp
_zcat _zdump
diff --git a/Completion/User/_netscape b/Completion/User/_netscape
index 2aba6750d..99d6ee45c 100644
--- a/Completion/User/_netscape
+++ b/Completion/User/_netscape
@@ -74,13 +74,15 @@ if [[ "$state" = "urls" ]]; then
_wanted values expl 'about what' \
compadd "$@" authors blank cache document fonts global hype image-cache \
license logo memory-cache mozilla plugins && ret=0
+ elif compset -P news: ; then
+ _newsgroups "$@" && ret=0
else
_tags prefixes
while _tags; do
while _next_label prefixes expl 'URL prefix' "$@"; do
_urls "$expl[@]" && ret=0
compset -S '[^:]*'
- compadd -S '' "$expl[@]" about: mocha: javascript: && ret=0
+ compadd -S '' "$expl[@]" about: news: mocha: javascript: && ret=0
done
(( ret )) || return 0
done
diff --git a/Completion/User/_newsgroups b/Completion/User/_newsgroups
new file mode 100644
index 000000000..74e878d11
--- /dev/null
+++ b/Completion/User/_newsgroups
@@ -0,0 +1,9 @@
+#autoload
+
+local expl
+
+: ${(A)_cache_newsgroups:=${${(f)"$(fgrep -vh \! ~/.newsrc*)"}%:*}}
+
+(( ${(w)#_cache_newsgroups} )) && _wanted newsgroups expl 'newsgroup' \
+ _multi_parts "$@" -i . _cache_newsgroups
+
diff --git a/Completion/User/_tin b/Completion/User/_tin
index 2441acf1f..21525c35d 100644
--- a/Completion/User/_tin
+++ b/Completion/User/_tin
@@ -34,7 +34,7 @@ _arguments -C -s \
"-X[don't save any files on quit]" \
'-z[start if any unread news]' \
'-Z[return status to indicate if any unread news]' \
- '::newsgroup' && return 0
+ '::newsgroup:_newsgroups' && return 0
if [[ "$state" = newshosts ]]; then
newshosts=( ${${(f)"$(<~/.tin/newsrctable)"}%%\#*} ) 2>/dev/null