summaryrefslogtreecommitdiff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_main_complete13
-rw-r--r--Completion/Darwin/Command/_defaults2
-rw-r--r--Completion/Darwin/Command/_fink2
-rw-r--r--Completion/Darwin/Command/_hdiutil36
-rw-r--r--Completion/Debian/Command/_dak8
-rw-r--r--Completion/Debian/Command/_debdiff6
-rw-r--r--Completion/Debian/Command/_dpkg2
-rw-r--r--Completion/Debian/Command/_linda2
-rw-r--r--Completion/Debian/Command/_lintian2
-rw-r--r--Completion/Debian/Command/_pbuilder4
-rw-r--r--Completion/Debian/Command/_piuparts2
-rw-r--r--Completion/Linux/Command/_modutils2
-rw-r--r--Completion/Mandriva/Command/_urpmi2
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_bittorrent8
-rw-r--r--Completion/Unix/Command/_bogofilter6
-rw-r--r--Completion/Unix/Command/_cdrdao2
-rw-r--r--Completion/Unix/Command/_cplay2
-rw-r--r--Completion/Unix/Command/_git4
-rw-r--r--Completion/Unix/Command/_hg8
-rw-r--r--Completion/Unix/Command/_ldd4
-rw-r--r--Completion/Unix/Command/_metaflac2
-rw-r--r--Completion/Unix/Command/_osc4
-rw-r--r--Completion/Unix/Command/_pax2
-rw-r--r--Completion/Unix/Command/_rubber4
-rw-r--r--Completion/Unix/Command/_sisu2
-rw-r--r--Completion/Unix/Command/_sqlite50
-rw-r--r--Completion/Unix/Command/_stgit2
-rw-r--r--Completion/Unix/Command/_subversion20
-rw-r--r--Completion/Unix/Command/_sudo2
-rw-r--r--Completion/Unix/Command/_systemctl6
-rw-r--r--Completion/Unix/Command/_texinfo2
-rw-r--r--Completion/Unix/Command/_vcsh18
-rw-r--r--Completion/Unix/Command/_vim2
-rw-r--r--Completion/Unix/Command/_vorbiscomment4
-rw-r--r--Completion/Unix/Command/_xmms22
-rw-r--r--Completion/Unix/Type/_path_commands12
-rw-r--r--Completion/Unix/Type/_services2
-rw-r--r--Completion/X/Command/.distfiles1
-rw-r--r--Completion/X/Command/_mplayer6
-rw-r--r--Completion/X/Command/_xclip14
-rw-r--r--Completion/X/Command/_xterm1
-rw-r--r--Completion/X/Type/.distfiles1
-rw-r--r--Completion/X/Type/_xft_fonts43
-rw-r--r--Completion/bashcompinit28
-rw-r--r--Completion/openSUSE/Command/_osc4
46 files changed, 258 insertions, 95 deletions
diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete
index 9bc5611de..d6831b81b 100644
--- a/Completion/Base/Core/_main_complete
+++ b/Completion/Base/Core/_main_complete
@@ -3,6 +3,10 @@
# The main loop of the completion code. This is what is called when
# completion is attempted from the command line.
+# Note that this function is parsed before $_comp_setup is evaluated,
+# so that it should make conservative assumptions about the setting
+# of the various options that affect parsing.
+
# In case non-standard separators are in use.
local IFS=$' \t\n\0'
@@ -52,9 +56,12 @@ if [[ ( "$tmp" = *pending(|[[:blank:]]*) && PENDING -gt 0 ) ||
fi
if [[ "$compstate[insert]" = tab* ]]; then
- { [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]] &&
- { [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
- zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return 0
+ if [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]]; then
+ if [[ "$curcontext" != :* || -z "$compstate[vared]" ]] ||
+ zstyle -t ":completion:vared${curcontext}:" insert-tab; then
+ return 0
+ fi
+ fi
compstate[insert]="${compstate[insert]//tab /}"
fi
diff --git a/Completion/Darwin/Command/_defaults b/Completion/Darwin/Command/_defaults
index e1b8fd923..7818e0379 100644
--- a/Completion/Darwin/Command/_defaults
+++ b/Completion/Darwin/Command/_defaults
@@ -9,7 +9,7 @@ _defaults_domains(){
_wanted domains expl 'defaults database domain' \
compadd -M 'r:|.=* r:|=*' -a list
else
- _files -g '*.plist(e:"reply=\${REPLY%.plist}":)'
+ _files -g '*.plist(-.:r)'
fi
}
diff --git a/Completion/Darwin/Command/_fink b/Completion/Darwin/Command/_fink
index 27ca3740c..55c9e8da5 100644
--- a/Completion/Darwin/Command/_fink
+++ b/Completion/Darwin/Command/_fink
@@ -157,7 +157,7 @@ _fink(){
#configure)
#selfupdate)
validate|check)
- _wanted files expl 'finkinfo file' _files -g \*.info ;;
+ _wanted files expl 'finkinfo file' _files -g "*.info(-.)" ;;
#scanpackages)
#checksums)
#cleanup)
diff --git a/Completion/Darwin/Command/_hdiutil b/Completion/Darwin/Command/_hdiutil
index c940f4739..13133b1f9 100644
--- a/Completion/Darwin/Command/_hdiutil
+++ b/Completion/Darwin/Command/_hdiutil
@@ -79,7 +79,7 @@ _hdiutil(){
local -A _common_usage_options
_common_usage_options=(
- -shadow "-shadow:shadow file:_files -g \*.shadow"
+ -shadow "-shadow:shadow file:_files -g '*.shadow(-.)'"
-encryption "-encryption:encryption method:(CEncryptedEncoding)"
-stdinpass "-stdinpass[specify password from standard input]"
-certificate "-certificate[secondary access certificate]:certificate file:_files"
@@ -89,7 +89,7 @@ _hdiutil(){
-tgtimagekey "*-tgtimagekey[target image key]: :->keyvalue"
-insecurehttp "-insecurehttp[ignore SSL host validation failure]"
-plist "-plist[display output in plist format]"
- -recover "-recover[keychain to unlock]:keychain file:_files -g \*.keychain"
+ -recover "-recover[keychain to unlock]:keychain file:_files -g '*.keychain(-.)'"
)
local -a _1st_arguments
@@ -178,7 +178,7 @@ _hdiutil(){
"(-autoopenro)-noautoopenro" \
"(-noautoopenrw)-autoopenrw[auto-open read/write volumes]" \
"(-autoopenrw)-noautoopenrw" \
- "1:disk image to attach:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image to attach:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
detach|eject)
@@ -195,7 +195,7 @@ _hdiutil(){
"$_common_usage_options[-imagekey]" \
"$_common_usage_options[-srcimagekey]" \
"$_common_usage_options[-plist]" \
- "1:disk image to verify:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image to verify:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
create)
@@ -265,7 +265,7 @@ _hdiutil(){
"-ov[overwrite an existing file]" \
"-format:format:_hdiutil_imageformat" \
"-o:target disk image:_files" \
- "1:source disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:source disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
if [[ $state = keyvalue ]]; then
@@ -302,7 +302,7 @@ _hdiutil(){
"-erase[erase the media]" \
"-fullerase[erase all sectors of the disc]" \
"-list[list all burning devices with paths suitable for -device]" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
makehybrid)
@@ -343,7 +343,7 @@ _hdiutil(){
"(-nokernel)-nokernel[attach with a helper process]" \
"(-kernel)-kernel[attach without a helper process]" \
"-o:target disk image:_files" \
- "1:source disk image or directory:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:source disk image or directory:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
compact)
@@ -356,7 +356,7 @@ _hdiutil(){
"$_common_usage_options[-insecurehttp]" \
"$_common_usage_options[-cacert]" \
"$_common_usage_options[-plist]" \
- "1:sparse image:_files -g \*.sparseimage" && return 0
+ "1:sparse image:_files -g '*.sparseimage(-.)'" && return 0
;;
info)
_arguments "$_common_options[@]" \
@@ -376,7 +376,7 @@ _hdiutil(){
"$_common_usage_options[-cacert]" \
"$_common_usage_options[-plist]" \
"-type:image type:(UDIF-CRC32 UDIF-MD5 DC42 CRC28 CRC32 MD5)" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
chpass)
@@ -386,7 +386,7 @@ _hdiutil(){
"$_common_usage_options[-srcimagekey]" \
"-oldstdinpass[specify old password from standard input]" \
"-newstdinpass[specify new password from standard input]" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
unflatten)
@@ -395,7 +395,7 @@ _hdiutil(){
"$_common_usage_options[-encryption]" \
"$_common_usage_options[-stdinpass]" \
"$_common_usage_options[-srcimagekey]" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
flatten)
@@ -408,7 +408,7 @@ _hdiutil(){
"(-noxml)-xml" \
"(-rsrcfork)-norsrcfork[don\'t embed resource fork data]" \
"(-norsrcfork)-rsrcfork" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
hfsanalyze)
@@ -420,7 +420,7 @@ _hdiutil(){
"$_common_usage_options[-shadow]" \
"$_common_usage_options[-insecurehttp]" \
"$_common_usage_options[-cacert]" \
- "1:disk image or device:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image or device:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
mountvol)
@@ -447,7 +447,7 @@ _hdiutil(){
"$_common_usage_options[-plist]" \
"-format[just print out the image format]" \
"-checksum[just print out the image checksum]" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
plugins)
@@ -462,7 +462,7 @@ _hdiutil(){
"$_common_usage_options[-srcimagekey]" \
"$_common_usage_options[-plist]" \
"(-yes -no -query)"{-yes,-no,-query} \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
;;
@@ -485,7 +485,7 @@ _hdiutil(){
"-shrinkonly[only allow the image to shrink]" \
"-nofinalgap[allow elimination of trailing free partition]" \
"-limits[displays min/current/max size]" \
- "1:disk image:_files -g \*.dmg\(\|.bin\)" \
+ "1:disk image:_files -g \*.dmg\(\|.bin\)\(-.\)" \
&& return 0
;;
segment)
@@ -501,7 +501,7 @@ _hdiutil(){
"-firstSegmentSize[first segment size]: :_hdiutil_imagesize" \
"-restricted[make restricted segments]" \
"-o[first segment name]:name" \
- "1:source disk image:_files -g \*.dmg\(\|.bin\)" \
+ "1:source disk image:_files -g \*.dmg\(\|.bin\)\(-.\)" \
&& return 0
;;
pmap)
@@ -514,7 +514,7 @@ _hdiutil(){
"$_common_usage_options[-insecurehttp]" \
"$_common_usage_options[-cacert]" \
"-options[just print out the image checksum]: :->option" \
- "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)" \
+ "1:disk image:_files -g \*.\(dmg\|sparseimage\)\(\|.bin\)\(-.\)" \
&& return 0
case "$state" in
diff --git a/Completion/Debian/Command/_dak b/Completion/Debian/Command/_dak
index 63bf2d06e..5aaaeefbc 100644
--- a/Completion/Debian/Command/_dak
+++ b/Completion/Debian/Command/_dak
@@ -137,7 +137,7 @@ case $cmd in
(clean-proposed-updates)
args+=(
'(-v --verbose)'{-v,--verbose}'[be more verbose about what is being done]'
- '*:changes or admin file:_files -g "*.(changes|joey)"'
+ '*:changes or admin file:_files -g "*.(changes|joey)(-.)"'
)
;;
@@ -151,7 +151,7 @@ case $cmd in
args+=(
'(-q --quiet)'{-q,--quiet}'[be quieter about what is being done]'
'(-v --verbose)'{-v,--verbose}'[be more verbose about what is being done]'
- '*:changes or deb or admin file:_files -g "*.(changes|deb|joey)"'
+ '*:changes or deb or admin file:_files -g "*.(changes|deb|joey)(-.)"'
)
;;
@@ -186,7 +186,7 @@ case $cmd in
(decode-dot-dak)
args+=(
- '*:dot-dak file:_files -g "*.dak"'
+ '*:dot-dak file:_files -g "*.dak(-.)"'
)
;;
@@ -222,7 +222,7 @@ case $cmd in
args+=(
'(-m --message)'{-m,--message=}'[use this message for rejection]:message:'
'(-s --no-mail)'{-s,--no-mail}'[do not send any mail]'
- '*:changes file:_files -g "*.changes"'
+ '*:changes file:_files -g "*.changes(-.)"'
)
;;
diff --git a/Completion/Debian/Command/_debdiff b/Completion/Debian/Command/_debdiff
index de7b9b9c8..6f8519a4a 100644
--- a/Completion/Debian/Command/_debdiff
+++ b/Completion/Debian/Command/_debdiff
@@ -17,6 +17,6 @@ _arguments \
'(-h --help)'{-h,--help}'[show help]' \
'(-v --version)'{-v,--version}'[show version]' \
'(-q --quiet)'{-q,--quiet}'[be quiet if no differences]' \
- '--from:debs:_files -g "*.deb"' \
- '--to:debs:_files -g "*.deb"' \
- '*:file to compare:_files -g "*.(deb|changes|dsc)"'
+ '--from:debs:_files -g "*.deb(-.)"' \
+ '--to:debs:_files -g "*.deb(-.)"' \
+ '*:file to compare:_files -g "*.(deb|changes|dsc)(-.)"'
diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg
index e251fbc38..e7184e7cc 100644
--- a/Completion/Debian/Command/_dpkg
+++ b/Completion/Debian/Command/_dpkg
@@ -73,7 +73,7 @@ _dpkg_options=(
_dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' )
_dpkg_deb_and_query_only_actions=(
- '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb'
+ '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb\(-.\)'
)
_dpkg_deb_and_query_only_options=(
diff --git a/Completion/Debian/Command/_linda b/Completion/Debian/Command/_linda
index d428d18a8..12ca72f3e 100644
--- a/Completion/Debian/Command/_linda
+++ b/Completion/Debian/Command/_linda
@@ -23,4 +23,4 @@ _arguments \
'(-U --unpack)'{-U,--unpack}':unpack level:' \
'(-v --verbose)'{-v,--verbose}'[verbose]' \
'(-V --version)'{-V,--version}'[version]' \
- ':package:_files -g "*.(changes|u#deb|dsc)"'
+ ':package:_files -g "*.(changes|u#deb|dsc)(-.)"'
diff --git a/Completion/Debian/Command/_lintian b/Completion/Debian/Command/_lintian
index 478d77a63..554be4550 100644
--- a/Completion/Debian/Command/_lintian
+++ b/Completion/Debian/Command/_lintian
@@ -38,7 +38,7 @@ case "$service" in
'(-s --source)'{-s,--source}'[the following packages are source]' \
'--udeb[the following packages are udebs]' \
'(-p --packages-file)'{-p,--packages-file}'[process packages listed in file]:list:_files' \
- '*:package:_files -g "*.(changes|deb|dsc)"' && return 0
+ '*:package:_files -g "*.(changes|deb|dsc)(-.)"' && return 0
;;
(lintian-info)
diff --git a/Completion/Debian/Command/_pbuilder b/Completion/Debian/Command/_pbuilder
index 225744f23..7811d567b 100644
--- a/Completion/Debian/Command/_pbuilder
+++ b/Completion/Debian/Command/_pbuilder
@@ -9,7 +9,7 @@ if (( CURRENT == 2 )); then
else
compset -n 1
_arguments \
- '--basetgz:location:_files -g "*.tgz"' \
+ '--basetgz:location:_files -g "*.tgz(-.)"' \
'--buildplace:location:_files -/' \
'--buildresult:location:_files -/' \
'--mirror:URL:_urls' \
@@ -28,5 +28,5 @@ else
'--save-after-login' \
'--save-after-exec' \
'--autocleanaptcache' \
- '*:source package:_files -g "*.dsc"'
+ '*:source package:_files -g "*.dsc(-.)"'
fi
diff --git a/Completion/Debian/Command/_piuparts b/Completion/Debian/Command/_piuparts
index 83e9ef115..a1b6666a3 100644
--- a/Completion/Debian/Command/_piuparts
+++ b/Completion/Debian/Command/_piuparts
@@ -24,7 +24,7 @@ case "$state" in
if (( $+opt_args[-a] )); then
_deb_packages avail
else
- _files -g '*.deb'
+ _files -g '*.deb(-.)'
fi
;;
esac
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index 48aeee973..39e00b4b0 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -117,7 +117,7 @@ _modutils() {
_tags files modules
while _tags; do
- _requested files expl "module file" _files -g '*.ko' && ret=0
+ _requested files expl "module file" _files -g '*.ko(-.)' && ret=0
_requested modules expl module compadd -a modules && ret=0
done
;;
diff --git a/Completion/Mandriva/Command/_urpmi b/Completion/Mandriva/Command/_urpmi
index 36982aae8..2468b2318 100644
--- a/Completion/Mandriva/Command/_urpmi
+++ b/Completion/Mandriva/Command/_urpmi
@@ -303,7 +303,7 @@ _urpmi() {
"($help --all --interactive --name)--summary[print tag summary: summary]" \
"($help)--uniq[do not print identical lines]" \
"($help --all --interactive --name)--url[print tag url: url]" \
- "*:hdlist files:_files -g '*.cz'" \
+ "*:hdlist files:_files -g '*.cz(-.)'" \
&& ret=0
;;
esac
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index a89b7d923..e54c6c0d2 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -200,6 +200,7 @@ _slrn
_socket
_sort
_spamassassin
+_sqlite
_sqsh
_ssh
_stgit
@@ -239,6 +240,7 @@ _unison
_units
_user_admin
_uzbl
+_vcsh
_vim
_vorbis
_vorbiscomment
diff --git a/Completion/Unix/Command/_bittorrent b/Completion/Unix/Command/_bittorrent
index 8c31a11ae..f7da2047a 100644
--- a/Completion/Unix/Command/_bittorrent
+++ b/Completion/Unix/Command/_bittorrent
@@ -50,18 +50,18 @@ case $service in
"--max_initiate+[specify peers needed before stopping initiating new connections]:peers:"\
"--report_hash_failures+[report hash failures to user]:enable:(0 1)"\
"--rarest_first_priority_cutoff+[specify peers which need to have a piece before other partials take priority over rarest first]:peers:"\
- ':torrent file:_files -g "*.torrent"' \
+ ':torrent file:_files -g "*.torrent(-.)"' \
&& return 0
;;
# Next up are the torrent file manipulation programs.
btshowmetainfo)
- _files -g "*.torrent" && return 0
+ _files -g "*.torrent(-.)" && return 0
;;
btrename)
- _files -g '*.torrent' && return 0
+ _files -g '*.torrent(-.)' && return 0
;;
btmakemetafile)
@@ -74,7 +74,7 @@ case $service in
;;
btreannounce)
- _files -g '*.torrent' && return 0
+ _files -g '*.torrent(-.)' && return 0
;;
# Lastly the tracker.
diff --git a/Completion/Unix/Command/_bogofilter b/Completion/Unix/Command/_bogofilter
index 980d3155e..44953cc71 100644
--- a/Completion/Unix/Command/_bogofilter
+++ b/Completion/Unix/Command/_bogofilter
@@ -29,16 +29,16 @@ _bogoutil() {
{-y,--timestamp-date=}'[date for when unknown]:date in YYYYMMDD format' \
'(--input-file -I)'{-I,--input-file=}'[input file]:input file:_files' \
{-x,--debug-flags=}'[debug flags]:debug flags:' \
- "($_bogoutil_actions)"{-d,--dump=}'[print contents of db]:database file:_files -g "*.db"' \
+ "($_bogoutil_actions)"{-d,--dump=}'[print contents of db]:database file:_files -g "*.db(-.)"' \
"($_bogoutil_actions)"{-l,--load=}'[load file into db]:textfile:_files' \
- "($_bogoutil_actions)"{-u,--upgrade=}'[upgrade wordlist version]:database file:_files -g "*.db"' \
+ "($_bogoutil_actions)"{-u,--upgrade=}'[upgrade wordlist version]:database file:_files -g "*.db(-.)"' \
"($_bogoutil_actions)"'-m[perform maintenance functions]:file:_files' \
"($_bogoutil_actions)"'-w[display token information]:database file or directory:_files' \
"($_bogoutil_actions)"'-p[display token probability information]:database file or directory:_files' \
"($_bogoutil_actions)"'-H[print histogram]:database file or directory:_files' \
"($_bogoutil_actions)"'-r[recalculate ROBX]:database:_files -/' \
"($_bogoutil_actions)"'-R[recalculate and save ROBX]:database:_files -/' \
- "($_bogoutil_actions)"{-k,--db-cachesize=}'[set Berkeley DB cache size]:size in MB:' \
+ "($_bogoutil_actions)"{-k,--db-cachesize=}'[set Berkeley DB cache size]:size in MB' \
"($_bogoutil_actions)"'--db-verify[verify database]:database:_files -/' \
"($_bogoutil_actions)"'--db-recover[run regular recovery]:database:_files -/' \
"($_bogoutil_actions)"'--db-recover-harder[run catastrophic recovery]:database:_files -/' \
diff --git a/Completion/Unix/Command/_cdrdao b/Completion/Unix/Command/_cdrdao
index e22ceb509..ce3742bc7 100644
--- a/Completion/Unix/Command/_cdrdao
+++ b/Completion/Unix/Command/_cdrdao
@@ -91,7 +91,7 @@ common_args=(
declare -ga common_toc_args
common_toc_args=(
$common_args
- ':TOC file:_files -g "*.toc"')
+ ':TOC file:_files -g "*.toc(-.)"')
declare -ga common_device_args
common_device_args=(
diff --git a/Completion/Unix/Command/_cplay b/Completion/Unix/Command/_cplay
index 3b4219173..f1755c1a1 100644
--- a/Completion/Unix/Command/_cplay
+++ b/Completion/Unix/Command/_cplay
@@ -5,4 +5,4 @@ _arguments -s \
'-r[toggle playlist repeat mode]' \
'-R[toggle playlist random mode]' \
'-v[toggle PCM and MASTER volume control]' \
- '*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)"'
+ '*:playlist or directory or audio file:_files -g "*.(mp3|mp2|ogg|669|amf|ams|dsm|far|it|med|mod|mt2|mtm|okt|s3m|stm|ult|gdm|xm|m3u|pls|spx|wav|au)(-.)"'
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 8a48c04b7..5ed921850 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -3636,7 +3636,7 @@ _git-index-pack () {
'--stdin[read pack from stdin and instead write to specified file]' \
$stdin_opts \
'--strict[die if the pack contains broken objects or links]' \
- ':pack file:_files -g "*.pack"'
+ ':pack file:_files -g "*.pack(-.)"'
}
(( $+functions[_git-merge-file] )) ||
@@ -4075,7 +4075,7 @@ _git-pack-redundant () {
'(:)--all[process all packs]' \
'--alt-odb[do not require objects to be present in local packs]' \
'--verbose[output some statistics to standard error]' \
- '(--all)*::packs:_files -g "*.pack"'
+ '(--all)*::packs:_files -g "*.pack(-.)"'
}
(( $+functions[_git-rev-list] )) ||
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg
index aeb64f660..f48598278 100644
--- a/Completion/Unix/Command/_hg
+++ b/Completion/Unix/Command/_hg
@@ -420,8 +420,8 @@ _hg_cmd_backout() {
'--parent[parent to choose when backing out merge]' \
'(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
'(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_tags' \
- '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
- '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
+ '(--message -m)'{-m+,--message}'[specify commit message]:text' \
+ '(--logfile -l)'{-l+,--logfile}'[read commit message from specified file]:log file:_files'
}
_hg_cmd_bisect() {
@@ -472,8 +472,8 @@ _hg_cmd_clone() {
_hg_cmd_commit() {
_arguments -s -w : $_hg_global_opts $_hg_pat_opts \
'(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
- '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
- '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
+ '(--message -m)'{-m+,--message}'[specify commit message]:text' \
+ '(--logfile -l)'{-l+,--logfile}'[read commit message from specified file]:log file:_files' \
'(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
'(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
'*:file:_hg_files'
diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd
index e739181d6..d59294717 100644
--- a/Completion/Unix/Command/_ldd
+++ b/Completion/Unix/Command/_ldd
@@ -28,5 +28,5 @@ fi
_arguments $args \
'*: : _alternative
- "executables:executable:_files -g \^\*.so\(\*\)"
- "shared-objects:shared object:_files -g \*.so"'
+ "executables:executable:_files -g \^\*.so\(\-\*\)"
+ "shared-objects:shared object:_files -g \*.so\(-.\)"'
diff --git a/Completion/Unix/Command/_metaflac b/Completion/Unix/Command/_metaflac
index e6cd13e13..14095e9f9 100644
--- a/Completion/Unix/Command/_metaflac
+++ b/Completion/Unix/Command/_metaflac
@@ -50,7 +50,7 @@ _metaflac_opers=(
)
_arguments "$_metaflac_opts[@]" \
- "*:FLAC file:_files -g \*.flac" \
+ "*:FLAC file:_files -g \*.flac\(-.\)" \
- "shortcuts" \
"$_metaflac_shorts[@]" \
- "(operations)" \
diff --git a/Completion/Unix/Command/_osc b/Completion/Unix/Command/_osc
index c15b40af2..a18890f5e 100644
--- a/Completion/Unix/Command/_osc
+++ b/Completion/Unix/Command/_osc
@@ -16,8 +16,8 @@
# version 0.2
#
-OSC_BUILD_TARGETS="openSUSE_10.2 openSUSE_10.3 openSUSE_11.0 openSUSE_11.1 openSUSE_11.2 openSUSE_11.3 openSUSE_Factory"
-OSC_PROJECTS="openSUSE:Factory openSUSE:11.2 openSUSE:11.3 openSUSE:11.1 openSUSE:11.0 openSUSE:10.3"
+OSC_BUILD_TARGETS="openSUSE_11.2 openSUSE_11.3 openSUSE_11.4 openSUSE_12.1 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP1"
+OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:12.1 openSUSE:11.4 openSUSE:11.2 openSUSE:11.3"
# user defined variables $OSC_BUILD_TARGETS_EXTRA and
# $OSC_PROJECTS_EXTRA can add to the project/build target list
diff --git a/Completion/Unix/Command/_pax b/Completion/Unix/Command/_pax
index 5d0edac88..7ebaa6aa5 100644
--- a/Completion/Unix/Command/_pax
+++ b/Completion/Unix/Command/_pax
@@ -19,7 +19,7 @@ _arguments -s \
123b 124b 125b 126b)' \
'-c[match all but specified]' \
'-d[match only directory but not contents]' \
- '-f:archive:_files -g "*.(tar|cpio)"' \
+ '-f:archive:_files -g "*.(tar|cpio)(-.)"' \
'-i[interactively rename files]' \
'-j[filter archive through bzip2]' \
'-k[do not overwrite existing files]' \
diff --git a/Completion/Unix/Command/_rubber b/Completion/Unix/Command/_rubber
index 526abaaa8..09e289aa2 100644
--- a/Completion/Unix/Command/_rubber
+++ b/Completion/Unix/Command/_rubber
@@ -43,7 +43,7 @@ case "$service" in
{-f,--force}'[force at least one compilation]' \
'--inplace[compile the documents from their source directory]' \
\*{-W,--warn}'=[report warnings of the given TYPE]:warnings:(all boxes misc refs)' \
- '*:LaTeX files:_files -g \*.\(tex\|dtx\|lhs\|w\)'
+ '*:LaTeX files:_files -g "*.(tex|dtx|lhs|w)(-.)"'
return 0
;;
@@ -64,7 +64,7 @@ case "$service" in
'--errors[show all errors that occured during compilation]' \
'--refs[show the list of undefined references]' \
'--warnings[show all LaTeX warnings]' \
- ':LaTeX file:_files -g \*.\(tex\|dtx\|lhs\|w\)'
+ ':LaTeX file:_files -g "*.(tex|dtx|lhs|w)(-.)"'
return 0
;;
esac
diff --git a/Completion/Unix/Command/_sisu b/Completion/Unix/Command/_sisu
index d3d53275b..6ca2abfaa 100644
--- a/Completion/Unix/Command/_sisu
+++ b/Completion/Unix/Command/_sisu
@@ -59,4 +59,4 @@ _arguments -s -C -M 'r:|[_-]=* r:|=*' \
'--to=dom[XML dom based input representation, experimental]' \
'--convert=footnotes[embedded footnotes]' \
'--to=current[current markup]' \
- '*:SiSU files:_files -g "*.(sst|ssm)(.)"'
+ '*:SiSU files:_files -g "*.(sst|ssm)(-.)"'
diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite
new file mode 100644
index 000000000..05027c603
--- /dev/null
+++ b/Completion/Unix/Command/_sqlite
@@ -0,0 +1,50 @@
+#compdef sqlite sqlite3
+
+local ret opt display_opt sqlite3
+local -a options output_modes exclusive dashes
+
+[[ $service = sqlite3 ]] && sqlite3=true || unset sqlite3
+
+# sqlite options require a single hyphen, but
+# sqlite3 allows options with one or two
+dashes=( '' )
+(( $+sqlite3 )) && dashes+=( - )
+
+options=(
+ '(-init --init)'$^dashes'-init[startup file]:file containing SQLite commands:_files'
+ $^dashes'-echo[echo commands]'
+)
+
+exclusive=( {,-}-{no,}header )
+options+=(
+ "($exclusive)"$^dashes'-header[turn headers on]'
+ "($exclusive)"$^dashes'-noheader[turn headers off]'
+)
+
+output_modes=( column HTML line list )
+(( $+sqlite3 )) && output_modes+=( csv )
+exclusive=( $^dashes-${^output_modes:l} )
+for display_opt in $output_modes ; do
+ # finagle the description to match the way SQLite's -help formats them
+ opt=$display_opt:l
+ [[ $opt = $display_opt ]] && display_opt="'$display_opt'"
+ options+=( "($exclusive)"$^dashes"-${opt}[set output mode to $display_opt]" )
+done
+
+options+=(
+ $^dashes'-separator[set output field separator]:string to separate output fields:'
+ $^dashes'-nullvalue[set null value string]:string for NULL values:'
+ '(- :)'$^dashes'-version[show SQLite version]'
+ '(- :)'$^dashes'-help[show help]'
+ '1:SQLite database file:_files'
+ '(- :)2:SQL to run'
+)
+
+(( $+sqlite3 )) && options+=(
+ $^dashes'-bail[stop after hitting an error]'
+ '(-*batch -*interactive)'$^dashes'-batch[force batch I/O]'
+ '(-*batch -*interactive)'$^dashes'-interactive[force interactive I/O]'
+ $^dashes'-stats[print memory stats before each finalize]'
+)
+
+_arguments $options
diff --git a/Completion/Unix/Command/_stgit b/Completion/Unix/Command/_stgit
index 129b21a92..b2f2aeafa 100644
--- a/Completion/Unix/Command/_stgit
+++ b/Completion/Unix/Command/_stgit
@@ -29,7 +29,7 @@ else
;;
(edit|files|goto|rename|log|float|delete|sink|mail|sync|show|pick|hide)
_wanted -V "patches" expl "patch" \
- compadd $(stg series --noprefix > /dev/null) \
+ compadd $(stg series --noprefix 2> /dev/null) \
&& ret=0
;;
(*)
diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion
index 21d809dd1..11d0b69e4 100644
--- a/Completion/Unix/Command/_subversion
+++ b/Completion/Unix/Command/_subversion
@@ -18,7 +18,7 @@ _svn () {
if [[ -n $state ]] && (( ! $+_svn_cmds )); then
typeset -gHA _svn_cmds
- if _cache_invalid svn-cmds || ! _retrieve_cache svn-cmds; then
+ if _cache_invalid svn-cmds || ! _retrieve_cache svn-cmds; then
_svn_cmds=(
${=${(f)${${"$(LC_ALL=C _call_program commands svn help)"#l#*Available subcommands:}%%Subversion is a tool*}}/(#s)[[:space:]]#(#b)([a-z]##)[[:space:]]#(\([a-z, ?]##\))#/$match[1] :$match[1]${match[2]:+:${${match[2]//[(),]}// /:}}:}
)
@@ -31,7 +31,7 @@ _svn () {
_wanted commands expl 'svn command' _svn_commands && ret=0
;;
args)
- local cmd args usage
+ local cmd args usage idx
typeset -gHA _cache_svn_status _cache_svn_mtime
cmd="${${(k)_svn_cmds[(R)*:$words[1]:*]}:-${(k)_svn_cmds[(i):$words[1]:]}}"
@@ -50,6 +50,9 @@ _svn () {
args=(
${=${${${(M)${(f)"$(LC_ALL=C _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]}
)
+ while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do
+ args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' )
+ done
_store_cache svn-${cmd}-args args
fi
@@ -92,6 +95,9 @@ _svn () {
'*:file:_files -g "*(e:_svn_controlled:)"'
)
;;
+ (mergeinfo)
+ args[(r)--show-revs:arg:]=( '--show-revs:revisions:(merged eligible)' )
+ ;;
(propget|propedit)
args+=(
'1:property name:_svn_props'
@@ -281,7 +287,7 @@ _svn_urls() {
if [[ ! -prefix *://? ]] ; then
zstyle -a ":completion:${curcontext}:" url-schemas urlsch \
|| urlsch=( file:// http:// https:// svn:// svn+ssh:// )
-
+
if (( $#urlsch )) ; then
compset -S '[^:]*'
_wanted url-schemas expl 'URL schema' compadd -S '' - $urlsch[@] && ret=0
@@ -309,6 +315,14 @@ _svn_props() {
compadd "$@" -a properties && return 0
}
+(( $+functions[_svn_changelists] )) ||
+_svn_changelists() {
+ local cls
+
+ cls=( ${${${(M)${(f)"$(LC_ALL=C _call_program changelists svn status 2>/dev/null)"}:#--- Changelist*}%??}##*\'} )
+ compadd "$@" -a cls && return 0
+}
+
_subversion () {
case $service in
(svn) _svn "$@" ;;
diff --git a/Completion/Unix/Command/_sudo b/Completion/Unix/Command/_sudo
index 384e9358b..f8543f865 100644
--- a/Completion/Unix/Command/_sudo
+++ b/Completion/Unix/Command/_sudo
@@ -3,7 +3,7 @@
local curcontext="$curcontext" environ e
local -a args
-zstyle -a "$curcontext" environ environ
+zstyle -a ":completion:${curcontext}:" environ environ
for e in "${environ[@]}"
do local -x "$e"
diff --git a/Completion/Unix/Command/_systemctl b/Completion/Unix/Command/_systemctl
index 69adcf775..3f54092a1 100644
--- a/Completion/Unix/Command/_systemctl
+++ b/Completion/Unix/Command/_systemctl
@@ -43,6 +43,7 @@ _systemctl()
'--global[Enable/disable unit files globally]' \
{-f,--force}'[When enabling unit files, override existing symlinks. When shutting down, execute action immediately]' \
'--defaults[When disabling unit files, remove default symlinks only]' \
+ '--root=[Enable unit files in the specified root directory]:directory:_directories' \
'*::systemctl command:_systemctl_command'
}
@@ -73,8 +74,13 @@ _hosts_or_user_at_host()
"status:Show runtime status of one or more units"
"show:Show properties of one or more units/jobs or the manager"
"reset-failed:Reset failed state for all, one, or more units"
+ "list-unit-files:List installed unit files"
"enable:Enable one or more unit files"
"disable:Disable one or more unit files"
+ "preset:Enable/disable one or more unit files based on preset configuration"
+ "mask:Mask one or more units"
+ "unmask:Unmask one or more units"
+ "link:Link one or more units into the search path"
"is-enabled:Check whether unit files are enabled"
"load:Load one or more units"
"list-jobs:List jobs"
diff --git a/Completion/Unix/Command/_texinfo b/Completion/Unix/Command/_texinfo
index 405de2629..12d964e3f 100644
--- a/Completion/Unix/Command/_texinfo
+++ b/Completion/Unix/Command/_texinfo
@@ -157,7 +157,7 @@ case $state in
_tags $tags
while _tags; do
if _requested files expl 'info file'; then
- _files "$expl[@]" $infopath -g '*.info' && ret=0
+ _files "$expl[@]" $infopath -g '*.info(-.)' && ret=0
fi
if _requested items; then
items=(${${(M)${${(f)"$(${info} --output - ${words[1,CURRENT-1]} 2>/dev/null)"}[1,(r)[[:space:]]#--- The Detailed Node Listing ---[[:space:]]#]}:#\* *~\* Menu:*}:/(#b)\*[[:space:]]##([^:]##):(#B)( \(?##\)[^.]#.|(:|))[[:space:]]#(#b)(*)[[:space:]]#/$match[1]${match[2]:+:}$match[2]})
diff --git a/Completion/Unix/Command/_vcsh b/Completion/Unix/Command/_vcsh
new file mode 100644
index 000000000..89588e4b2
--- /dev/null
+++ b/Completion/Unix/Command/_vcsh
@@ -0,0 +1,18 @@
+#compdef vcsh
+
+_arguments \
+ ':subcommand:((
+ clone\:"clone from repo"
+ help\:"display help"
+ delete\:"delete repo"
+ enter\:"Enter repo; spawn new \$SHELL"
+ init\:"init & clone from repo"
+ list\:"list all repos"
+ list-tracked\:"list all files tracked by vcsh"
+ list-tracked-by\:"list files tracked by a repo"
+ rename\:"rename repo"
+ run\:"run command on repo"
+ setup\:"set up repo with recommended settings"
+ write-gitignore\:"write .gitignore.d/foo via git ls-files"
+ \<REPO\>\:"Run git command directly"
+ ))'
diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim
index 7aec1ecf7..2c9b0a1a4 100644
--- a/Completion/Unix/Command/_vim
+++ b/Completion/Unix/Command/_vim
@@ -46,7 +46,7 @@ arguments=(
'-D[debugging mode]'
'-n[no swap file (memory only)]'
'-nb[start as NetBean server]'
- {-r,-L}'[list swap files and exit or recover from a swap file]::swap file:_vim_files -g \*.sw\?'
+ {-r,-L}'[list swap files and exit or recover from a swap file]::swap file:_vim_files -g "*.sw?(-.)"'
'( -H -F)-A[start in Arabic mode]'
'(-A -F)-H[start in Hebrew mode]'
'(-A -H )-F[start in Farsi mode]'
diff --git a/Completion/Unix/Command/_vorbiscomment b/Completion/Unix/Command/_vorbiscomment
index 4cefe1a1a..bd7459e04 100644
--- a/Completion/Unix/Command/_vorbiscomment
+++ b/Completion/Unix/Command/_vorbiscomment
@@ -13,6 +13,6 @@ _arguments \
'(-l)-w[overwrite comments]' \
'(-l -c)-t[tag and value]:: ' \
'(-l -t)-c[tag file]::_files' \
- '1:OGG file:_files -g \*.ogg' \
- '(-l)2:output OGG file:_files -g \*.ogg' \
+ '1:OGG file:_files -g "*.ogg(-.)"' \
+ '(-l)2:output OGG file:_files -g "*.ogg(-.)"' \
&& return 0
diff --git a/Completion/Unix/Command/_xmms2 b/Completion/Unix/Command/_xmms2
index 95ea04b33..525d5177c 100644
--- a/Completion/Unix/Command/_xmms2
+++ b/Completion/Unix/Command/_xmms2
@@ -198,7 +198,7 @@ _xmms2_radd() {
_xmms2_addpls() {
local expl
_description files expl 'playlist'
- _files "$expl[@]" -g '*.([mM]3[uU]|[pP][lL][sS])'
+ _files "$expl[@]" -g '*.([mM]3[uU]|[pP][lL][sS])(-.)'
}
_xmms2() {
diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands
index 393c0c67e..22d2aaeba 100644
--- a/Completion/Unix/Type/_path_commands
+++ b/Completion/Unix/Type/_path_commands
@@ -82,6 +82,18 @@ if [[ -n $need_desc ]]; then
else
_wanted commands expl 'external command' compadd "$@" -k commands && ret=0
fi
+if [[ -o path_dirs ]]; then
+ local -a path_dirs
+ path_dirs=(${^path}/*(/N:t))
+ (( ${#path_dirs} )) &&
+ _wanted path-dirs expl 'directory in path' compadd "$@" -a path_dirs && ret=0
+
+ if [[ $PREFIX$SUFFIX = */* ]]; then
+ # Find command from path, not hashed
+ _wanted commands expl 'external command' _path_files -W path -g '*(*)' &&
+ ret=0
+ fi
+fi
return $ret
}
diff --git a/Completion/Unix/Type/_services b/Completion/Unix/Type/_services
index 496054795..3dd1e1231 100644
--- a/Completion/Unix/Type/_services
+++ b/Completion/Unix/Type/_services
@@ -10,7 +10,7 @@ if [[ $OSTYPE = freebsd* ]]; then
_wanted services expl service compadd "$@" - $alls[@] && ret=0
fi
elif chkconfig --list > /dev/null 2>&1; then
- alls=( ${(f)"$(LANGUAGE=C LANG=C LC_ALL=C chkconfig --list)"} )
+ alls=( ${(f)"$(LANGUAGE=C LANG=C LC_ALL=C chkconfig --list 2> /dev/null)"} )
inits=( ${${${alls[1,(r)xinetd based*]}[1,-2]}/%[[:space:]]*/} )
xinetds=( ${${${${alls[(r)xinetd based*,-1]}[2,-1]}/#[[:space:]]#}/%:*} )
diff --git a/Completion/X/Command/.distfiles b/Completion/X/Command/.distfiles
index 3b6dc49fa..c6835ea54 100644
--- a/Completion/X/Command/.distfiles
+++ b/Completion/X/Command/.distfiles
@@ -20,6 +20,7 @@ _urxvt
_vnc
_x_utils
_xauth
+_xclip
_xdvi
_xfig
_xloadimage
diff --git a/Completion/X/Command/_mplayer b/Completion/X/Command/_mplayer
index 85c4f6d12..81669fc1c 100644
--- a/Completion/X/Command/_mplayer
+++ b/Completion/X/Command/_mplayer
@@ -115,12 +115,12 @@ case "$state" in
_tags files urls
while _tags; do
_requested files expl 'video file' _files -g \
- "*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|qt|rm|vob|wav|webm|wma|wmv)(-.)" && ret=0
+ "*.(#i)(asf|asx|avi|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|qt|rm|vob|wav|webm|wma|wmv)(-.)" && ret=0
if _requested urls; then
while _next_label urls expl URL; do
_urls "$expl[@]" && ret=0
- compadd -S '' "$expl[@]" {dvd,vcd,cdda,cddb,tv}:// && ret=0
- done
+ compadd -S '' "$expl[@]" {dvd,vcd,cdda,cddb,tv}:// && ret=0
+ done
fi
(( ret )) || return 0
done
diff --git a/Completion/X/Command/_xclip b/Completion/X/Command/_xclip
new file mode 100644
index 000000000..759251c28
--- /dev/null
+++ b/Completion/X/Command/_xclip
@@ -0,0 +1,14 @@
+#compdef xclip
+
+_arguments \
+ '(-i -in -o -out)'{-i,-in}'[Read text into X selection]' \
+ '(-i -in -o -out)'{-o,-out}'[Print selection to standard out]' \
+ {-l,-loops}'[Number of selection requests to wait before exiting]:number:' \
+ {-d,-display}'[X display to connect to]:X11 display:' \
+ '(-)'{-h,-help}'[Usage information]' \
+ '(-selection)-selection[Selection to access]:selection:(primary secondary clipboard buffer-cut)' \
+ $'-noutf8[Use old Unicode, don\'t treat text as UTF-8]' \
+ '(-)-version[version information]' \
+ '(-quiet -verbose)-silent[Errors only, run in background]' \
+ $'(-silent -verbose)-quiet[Run in foreground, show what\'s happening]' \
+ '(-silent -quiet)-verbose[Running commentary]'
diff --git a/Completion/X/Command/_xterm b/Completion/X/Command/_xterm
index a246ab48e..7619b280a 100644
--- a/Completion/X/Command/_xterm
+++ b/Completion/X/Command/_xterm
@@ -9,6 +9,7 @@ _xt_arguments \
'-cc:character class:' \
'-cr:text cursor color:_x_color' \
'-e:program: _command_names -e:*::program arguments: _normal' \
+ '-fa:font pattern:_xft_fonts' \
'-fb:bold font:_x_font' \
'-fi:icon font:_x_font' \
'-hc:background color for highlighted text:_x_color' \
diff --git a/Completion/X/Type/.distfiles b/Completion/X/Type/.distfiles
index 364e4e6e6..fa5c16ce0 100644
--- a/Completion/X/Type/.distfiles
+++ b/Completion/X/Type/.distfiles
@@ -6,4 +6,5 @@ _x_colormapid _x_keysym _x_title
_x_cursor _x_locale _x_window
_x_display _x_modifier _xt_session_id
_x_extension _x_name _x_visual
+_xft_fonts
'
diff --git a/Completion/X/Type/_xft_fonts b/Completion/X/Type/_xft_fonts
new file mode 100644
index 000000000..0d5f56fe5
--- /dev/null
+++ b/Completion/X/Type/_xft_fonts
@@ -0,0 +1,43 @@
+#compdef fc-list fc-match
+
+local -a suf
+local font=${${PREFIX//-[0-9]##:/:}%:*}: ret=1
+local attr
+
+compset -S ':*' || suf=( -S: -r "-: \t\n\-" )
+if compset -P '*:'; then
+ attr="${PREFIX%\=*}"
+ if compset -P '*='; then
+ case $attr in
+ hintstyle)
+ _wanted value expl 'value' compadd "$suf[@]" \
+ hint{none,slight,medium,full} && ret=0
+ ;;
+ *)
+ _wanted value expl 'value' compadd "$suf[@]" \
+ ${${(f)"$(_call_program font-attrs
+ fc-list $font $attr 2>/dev/null)"//,/$'\n'}##*=} && ret=0
+ ;;
+ esac
+ else
+ _tags elements {weight,slant}-constants
+ while _tags; do
+ _requested elements expl element compadd -qS= hintstyle hinting autohint \
+ size ${${(u)${(M)${(f)"$(_call_program elements
+ fc-list -v $font 2>/dev/null)"}:# [a-z]*}%%:*}#?} && ret=0
+ _requested weight-constants expl 'weight constant' compadd "$suf[@]" \
+ thin bold regular medium semibold heavy roman && ret=0
+ _requested slant-constants expl 'slant constant' compadd "$suf[@]" \
+ roman italic oblique && ret=0
+
+ (( ret )) || break
+ done
+ fi
+elif compset -P '*[^\\]-'; then
+ _message -e size 'point size' && ret=0
+else
+ _wanted fonts expl font compadd "$suf[@]" \
+ ${${(f)"$(_call_program fonts fc-list 2>/dev/null)"//,/$'\n'}%%:*} && ret=0
+fi
+
+return ret
diff --git a/Completion/bashcompinit b/Completion/bashcompinit
index 63101a9c8..6cc3be580 100644
--- a/Completion/bashcompinit
+++ b/Completion/bashcompinit
@@ -8,7 +8,7 @@ _bash_complete() {
local COMP_LINE="$words"
local -A savejobstates savejobtexts
- (( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT-1]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
+ (( COMP_POINT = 1 + ${#${(j. .)words[1,CURRENT]}} + $#QIPREFIX + $#IPREFIX + $#PREFIX ))
(( COMP_CWORD = CURRENT - 1))
COMP_WORDS=( $words )
BASH_VERSINFO=( 2 05b 0 1 release )
@@ -18,15 +18,15 @@ _bash_complete() {
[[ ${argv[${argv[(I)nospace]:-0}-1]} = -o ]] && suf=( -S '' )
- matches=( ${(f)"$(compgen $@)"} )
+ matches=( ${(f)"$(compgen $@ -- ${words[CURRENT]})"} )
if [[ -n $matches ]]; then
if [[ ${argv[${argv[(I)filenames]:-0}-1]} = -o ]]; then
compset -P '*/' && matches=( ${matches##*/} )
compset -S '/*' && matches=( ${matches%%/*} )
- compadd -f "${suf[@]}" -a matches && ret=0
+ compadd -Q -f "${suf[@]}" -a matches && ret=0
else
- compadd "${suf[@]}" -a matches && ret=0
+ compadd -Q "${suf[@]}" -a matches && ret=0
fi
fi
@@ -41,18 +41,12 @@ _bash_complete() {
return ret
}
-_compgen_opt_words() {
- typeset -a words
- words=( ${~=1} )
- local find="$2"
- results=(${(M)words[@]:#$find*})
-}
-
compgen() {
local opts prefix suffix job OPTARG OPTIND ret=1
local -a name res results jids
local -A shortopts
+ # words changes behavior: words[1] -> words[0]
emulate -L sh
setopt kshglob noshglob braceexpand nokshautoload
@@ -127,12 +121,13 @@ compgen() {
;;
F)
COMPREPLY=()
+ local -a args
+ args=( "${words[0]}" "${@[-1]}" "${words[CURRENT-2]}" )
(){
- set -- "${words[0]}" "${words[CURRENT-1]}" "${words[CURRENT-2]}"
# There may be more things we need to add to this typeset to
# protect bash functions from compsys special variable names
typeset -h words
- $OPTARG "$@"
+ $OPTARG "${args[@]}"
}
results+=( "${COMPREPLY[@]}" )
;;
@@ -141,7 +136,7 @@ compgen() {
results+=( ${~OPTARG} )
unsetopt nullglob
;;
- W) _compgen_opt_words "$OPTARG" "${@[-1]}" ;;
+ W) results+=( ${(Q)~=OPTARG} ) ;;
C) results+=( $(eval $OPTARG) ) ;;
P) prefix="$OPTARG" ;;
S) suffix="$OPTARG" ;;
@@ -157,10 +152,9 @@ compgen() {
# support for the last, `word' option to compgen. Zsh's matching does a
# better job but if you need to, comment this in and use compadd -U
- #shift $(( OPTIND - 1 ))
- #(( $# )) && results=( "${(M)results[@]:#$1*}" )
+ # (( $# >= OPTIND)) && results=( "${(M)results[@]:#${@[-1]}*}" )
- print -l -- "$prefix${^results[@]}$suffix"
+ print -l -r -- "$prefix${^results[@]}$suffix"
}
complete() {
diff --git a/Completion/openSUSE/Command/_osc b/Completion/openSUSE/Command/_osc
index c15b40af2..a18890f5e 100644
--- a/Completion/openSUSE/Command/_osc
+++ b/Completion/openSUSE/Command/_osc
@@ -16,8 +16,8 @@
# version 0.2
#
-OSC_BUILD_TARGETS="openSUSE_10.2 openSUSE_10.3 openSUSE_11.0 openSUSE_11.1 openSUSE_11.2 openSUSE_11.3 openSUSE_Factory"
-OSC_PROJECTS="openSUSE:Factory openSUSE:11.2 openSUSE:11.3 openSUSE:11.1 openSUSE:11.0 openSUSE:10.3"
+OSC_BUILD_TARGETS="openSUSE_11.2 openSUSE_11.3 openSUSE_11.4 openSUSE_12.1 openSUSE_Tumbleweed openSUSE_Factory SLE_11_SP1"
+OSC_PROJECTS="openSUSE:Factory openSUSE:Tumbleweed openSUSE:12.1 openSUSE:11.4 openSUSE:11.2 openSUSE:11.3"
# user defined variables $OSC_BUILD_TARGETS_EXTRA and
# $OSC_PROJECTS_EXTRA can add to the project/build target list