about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-10-25 13:13:22 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-10-25 13:13:22 +0000
commit71963da3975f941ce37a36fe99d60462226659e2 (patch)
treebf988bb3b3bbccc2fb6238dc45e6f7409504df43
parentcc34ebd89a5421f1ba71a433222a4528d9c943a2 (diff)
downloadzsh-71963da3975f941ce37a36fe99d60462226659e2.tar.gz
zsh-71963da3975f941ce37a36fe99d60462226659e2.tar.xz
zsh-71963da3975f941ce37a36fe99d60462226659e2.zip
arno: two new completions
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_getmail27
-rw-r--r--Completion/Unix/Command/_yafc44
4 files changed, 76 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2556b8a7d..1838b2bd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-10-25  Peter Stephenson  <pws@csr.com>
 
+	* arno: Completion/Unix/Command/{_getmail,_yafc,.distfiles}:
+	two new completions.
+
 	* unposted: Completion/Debian/Command/.distfiles,
 	Completion/Linux/Command/.distfiles,
 	Completion/Linux/Type/.distfiles,
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 6ad8c78dd..973f7377e 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -12,6 +12,7 @@ _ecasound       _elinks         _elm            _enscript       _env
 _fakeroot       _fetchmail      _figlet         _find           _finger
 _flasher        _flex           _fortune        _fsh            _fuser
 _gcc            _gdb            _getconf        _getent         _git
+_getmail
 _global         _gnu_generic    _gnutls         _gpg            _gphoto2
 _gprof          _grep           _groff          _gs             _gzip
 _iconv          _ifconfig       _imagemagick    _init_d         _irssi
@@ -41,5 +42,6 @@ _twisted        _unace          _unexpand       _uniq           _user_admin
 _vim            _vorbis         _vorbiscomment  _vux            _w3m
 _webbrowser     _wget           _whereis        _whois          _wiggle
 _xargs          _xmlsoft        _yodl           _yp             _zcat
+_yafc
 _zdump          _zip            _sisu
 '
diff --git a/Completion/Unix/Command/_getmail b/Completion/Unix/Command/_getmail
new file mode 100644
index 000000000..e7c83bee3
--- /dev/null
+++ b/Completion/Unix/Command/_getmail
@@ -0,0 +1,27 @@
+#compdef getmail
+
+_getmail_confiles() {
+    local -a a f
+    local expl
+    f=( ~/.getmail/*~$HOME/.getmail/oldmail*(.))
+    a=(${f#~/.getmail/})
+    _wanted getmail-conffile expl 'config file' compadd "$@" -a - a
+}
+
+local -a arguments
+    arguments=(
+        '--version[show version]'
+        '(--help,-h)'{--help,-h}'[display help]'
+        '(--getmaildir,-g)'{--getmaildir=,-g+}'[specify config/data directory]:config directory:_directories'
+        \*{--rcfile=,-r+}'[specify configuration file]:config file:_getmail_confiles'
+        '--dump[dump configuration]'
+        '--trace[print extended information]'
+        '*:files:_files'
+        \*{--verbose,-v}'[verbose mode]'
+        '(--quiet,-q)'{--quiet,-q}'[silent mode]'
+        '(--delete,-d,--dont-delete,-l)'{--delete,-d}'[delete messages from server]'
+        '(--delete,-d,--dont-delete,-l)'{--dont-delete,-l}"[don't delete messages from server]"
+        '(--new,-n,--all,-a)'{--all,-a}'[retrieve all messages]'
+        '(--new,-n,--all,-a)'{--new,-n}'[retrieve only new messages]'
+    )
+_arguments -s -S $arguments
diff --git a/Completion/Unix/Command/_yafc b/Completion/Unix/Command/_yafc
new file mode 100644
index 000000000..0cc9b8f81
--- /dev/null
+++ b/Completion/Unix/Command/_yafc
@@ -0,0 +1,44 @@
+# compdef yafc
+
+_yafc() {
+    local arguments
+    arguments=(
+    '(--anon -a)'{--anon,-a}'[Try an anonymous login]'
+    '(--debug -d)'{--debug,-d}'[Print all messages to/from server]'
+    '(--dump-rc -D)'{--dump-rc,-D}'[Print the default configuration file]'
+    '(--mechanism,-m)'{--mechanism=-,-m}'[specify a security mechanism]:security mechanism:(krb4, krb5, none)'
+    '(--norc,-n)'{--norc,-n}'[Do not read the users configuration file]'
+    '(--noproxy,-p)'{--noproxy,-p}'[Do not connect via the proxy]'
+    '(--quiet,-q)'{--quiet,-q}'[Do not print the welcome message]'
+    '(--rcfile,-r)'{--rcfile=-,-r}'[Specify a configuration file]:configuration file:_files'
+    '(--trace,-t)'{--trace=-,-t-}'[Specify a trace file]:trace file:_files'
+    '(--noauto,-u)'{--noauto,-u}'[Do not login automagically]'
+    '(--noalias,-U)'{--noalias,-U}'[As --noauto, but bookmark aliases is disabled]'
+    '(--verbose,-v)'{--verbose,-v}'[print all responses received]'
+    '(--wait,-w)'{--wait,-w=}'[Specify a waiting time between connection attempts]:wait time: '
+    '(--workdir,-W)'{--workdir=,-W+}'[Use a different working directory]:working directory:_directories'
+    '(--version,-V)'{--version,-V}'[Print version information]'
+    '(--help,-h)'{--help,-h}'[Print a short help description]'
+    '*:address:_yafc_address'
+    )
+
+    _arguments -S -s $arguments
+}
+
+ (( $+functions[_yafc_bookmarks] )) ||
+_yafc_bookmarks() {
+    local bkmfile=~/.yafc/bookmarks
+    
+    if [[ -f $bkmfile ]]; then
+        local -a bkms
+        bkms=(${${${(M)"${(f)$(<$bkmfile)}":#machine*alias ##\'*\' #}##machine*alias ##\'}%%\' #}) #" vim syntax goes crazy
+        _wanted bookmarks expl 'bookmarks' compadd "$@" -a - bkms
+    fi
+}
+
+ (( $+functions[_yafc_address] )) ||
+_yafc_address() {
+  _alternative 'bookmarks:bookmark:_yafc_bookmarks' '_hosts'
+}
+
+_yafc "$@"