about summary refs log tree commit diff
path: root/Completion/Unix/Command/_irssi
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-07-31 15:26:13 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-07-31 15:26:13 +0000
commitb84399b9cbb93f199d695d7cb264c44178a8d5e0 (patch)
treeaf329c706dd4104718b02c78e2009f9488ad59e5 /Completion/Unix/Command/_irssi
parent27665b32d6e1f60d6e786baa2478aa396f7e9b98 (diff)
downloadzsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.tar.gz
zsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.tar.xz
zsh-b84399b9cbb93f199d695d7cb264c44178a8d5e0.zip
tidy up of many completions (updates, fixes, improvements and plain aesthetics)
Diffstat (limited to 'Completion/Unix/Command/_irssi')
-rw-r--r--Completion/Unix/Command/_irssi59
1 files changed, 25 insertions, 34 deletions
diff --git a/Completion/Unix/Command/_irssi b/Completion/Unix/Command/_irssi
index d84812010..81735cd2b 100644
--- a/Completion/Unix/Command/_irssi
+++ b/Completion/Unix/Command/_irssi
@@ -1,45 +1,36 @@
 #compdef irssi
 
-typeset -A opt_args
-
 local expl
 
 _irssi_servers() {
-		local a
-		a=($(grep "\(^[{ 	]*address\)\|\([{ 	]address\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*address *= *\"\([^\"]\+\).*,\1 ,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*address\)\|\([{ 	]address\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*address *= *\"\([^\"]\+\).*,\1 ,g") )
+  _wanted irc-servers expl 'irc server' compadd "$@" -a - a
+}
 
 _irssi_ports() {
-		local a
-		a=($(grep "\(^[{ 	]*port\)\|\([{ 	]port\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*port *= *\"\([^\"]\+\).*,\1,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*port\)\|\([{ 	]port\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*port *= *\"\([^\"]\+\).*,\1,g") )
+  _wanted ports expl 'port' compadd "$@" -a - a
+}
 
 _irssi_nick() {
-		local a
-		a=($(grep "\(^[{ 	]*nick\)\|\([{ 	]nick\)\|\([{ 	]alternate_nick\)\|\(^[{ 	]*alternate_nick\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*nick *= *\"\([^\"]\+\).*,\1,g"))
-		compadd -x 'use "--help" to get descriptions' $a[@]
-		}
+  local a
+  a=( $(grep "\(^[{ 	]*nick\)\|\([{ 	]nick\)\|\([{ 	]alternate_nick\)\|\(^[{ 	]*alternate_nick\)[ 	]*=" ~/.irssi/config | sed -e "s,^.*nick *= *\"\([^\"]\+\).*,\1,g") )
+  _wanted nicknames expl 'nick' compadd "$@" -a - a
+}
 
-_arguments -C -s \
-	"--config=[config file]:config:_files" \
-	"--home=[home dir location]:home:_dir_list" \
-	"-c[connect to servers]:irc servers: _irssi_servers" \
-	"--connect=[connect to servers]:irc servers: _irssi_servers" \
-	'-w[password]' \
-	'--password=[password]' \
-	"-p[specify a port]:port: _irssi_ports" \
-	"--port=[specify a port]:port: _irssi_ports" \
-	'-![disable autoconnect]' \
-	'--noconnect[disable autoconnect]' \
-	"-n[set nick name]:nick: _irssi_nick" \
-	"--nick=[set nick name]:nick: _irssi_nick" \
-	'-h[hostname]' \
-	'--hostname=[hostname]' \
-	'-v[version]' \
-	'--version[version]' \
-	'-?[help message]' \
-	'--help[help message]' \
-	'--usage[display usage]' \
+_arguments -s \
+  '--config=[config file]:config:_files' \
+  '--home=[home dir location]:home:_dir_list' \
+  '(-c --connect)'{-c,--connect=}'[connect to servers]:irc server:_irssi_servers' \
+  '(-w --password)'{-w,--password=}'[password]:password' \
+  '(-p --port)'{-p,--port=}'[specify a port]:port:_irssi_ports' \
+  '-![disable autoconnect]' \
+  '--noconnect[disable autoconnect]' \
+  '(-n --nick)'{-n,--nick=}'[set nick name]:nick:_irssi_nick" \
+  '(-h --hostname)'{-h,--hostname=}'[specify hostname]:hostname:_hosts' \
+  '(-)'{-v,--version}'[display version information]' \
+  '(-)'{-\?,--help}'[display help information]' \
+  '(-)--usage[display usage]' \