summaryrefslogtreecommitdiffstats
path: root/Completion/X
diff options
context:
space:
mode:
authordana <dana@dana.is>2026-06-30 19:19:13 -0500
committerdana <dana@dana.is>2026-07-03 07:02:41 -0500
commitb39c9fa22dd59879acaf3da30e0a905c03ae2782 (patch)
tree9a6a4614a129e618544f26abd40ca041ee3b03aa /Completion/X
parent54889: comparguments: always parse optargs as optargs (diff)
downloadzsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.gz
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.bz2
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.lz
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.xz
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.tar.zst
zsh-b39c9fa22dd59879acaf3da30e0a905c03ae2782.zip
54891: completion: remove obsolete functions
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Command/_acroread119
-rw-r--r--Completion/X/Command/_dcop119
-rw-r--r--Completion/X/Command/_netscape93
3 files changed, 0 insertions, 331 deletions
diff --git a/Completion/X/Command/_acroread b/Completion/X/Command/_acroread
deleted file mode 100644
index 4a5cb5cb8..000000000
--- a/Completion/X/Command/_acroread
+++ /dev/null
@@ -1,119 +0,0 @@
-#compdef acroread
-
-local curcontext="$curcontext" state line
-local cmdfile
-
-if [[ -z $_acroread_version ]]; then
- _acroread_version="$($words[1] -version 2>/dev/null)"
-fi
-
-if [[ -z $_acroread_version ]]; then
- if [[ $words[1] = */* && -x $words[1] ]]; then
- cmdfile=$words[1]
- elif [[ -x $commands[$words[1]] ]]; then
- cmdfile=$commands[$words[1]]
- fi
-
- # Try extracting the version number directly from the executable.
- # (This will fail if the executable is a wrapper script for acroread.)
- _acroread_version=${${(M)${(f)"$(<$cmdfile)"}:#ver=*}##ver=}
-
- if [[ -z $_acroread_version ]]; then
- local acropath=${${(s. .)${${(f)"$($words[1] -help 2>&1)"}[1]}}[2]}
- if [[ -r $acropath ]]; then
- _acroread_version=${${(M)${(f)"$(<$acropath)"}:#ver=*}##ver=}
- fi
- fi
-fi
-
-if [[ $_acroread_version == [789].* ]]; then
- local -a extra_args
- extra_args=()
- if [[ $_acroread_version == [89].* ]]; then
- extra_args+=(-man '-installCertificate:server ip::server port')
- fi
- if [[ $_acroread_version == 9.* ]]; then
- extra_args+=(-openInNewInstance)
- fi
- _arguments -C \
- "${extra_args[@]}" \
- '--display=:X display:_x_display' \
- '--screen=:X screen (overrides the screen part of DISPLAY)' \
- --sync \
- '-geometry:[<width>x<height>][{+|-}<x offset>{+|-}<y offset>]' \
- -help \
- -iconic \
- '*-setenv:<var>=<value>' \
- -tempFile \
- '-tempFileTitle:title' \
- -openInNewWindow \
- -version \
- '-visual:X visual:_x_visual' \
- '-toPostScript:*::PostScript conversion options:= ->tops' \
- '*:PDF file:_files -g "*.(#i)pdf(-.)"' && return
-
- [[ -n "$state" ]] && _arguments \
- '-pairs:*:pdf_file_1 ps_file_1 ...:_files -g "*.(#i)(pdf|ps)(-.)"' \
- -binary \
- '-start:integer' \
- '-end:integer' \
- -optimizeForSpeed \
- -landscape \
- -reverse \
- '(-even)-odd' \
- '(-odd)-even' \
- -commentsOff \
- -annotsOff \
- -stampsOff \
- -markupsOn \
- '(-level3)-level2' \
- '(-level2)-level3' \
- -printerhalftones \
- -saveVM \
- '-scale:integer' \
- -shrink \
- -expand \
- '-size:page size (or custom size wxh in points):(letter tabloid ledger legal executive a3 a4 a5 b4 b5)' \
- '-transQuality:transparency flattening level:(1 2 3 4 5)' \
- '*:PDF file:_files -g "*.(#i)pdf(-.)"' && return
-else
- _x_arguments -C \
- -help \
- -helpall \
- \*-iconic \
- \*+iconic \
- '-name:application name:_x_name' \
- '*-setenv:<var>=<value>' \
- -tempFile \
- '-tempFileTitle:title' \
- '(+useFrontEndProgram)-useFrontEndProgram' \
- '(-useFrontEndProgram)+useFrontEndProgram' \
- '-visual:X visual:_x_visual' \
- '-xrm:X resource specification:_x_resource' \
- '-toPostScript:*::PostScript conversion options:= ->tops' \
- '*:PDF file:_files -g "*.(#i)pdf(-.)"' && return
-
- [[ -n "$state" ]] && _arguments \
- '-pairs:*:pdf_file_1 ps_file_1 ...:_files -g "*.(#i)(pdf|ps)(-.)"' \
- -binary \
- '-start:integer' \
- '-end:integer' \
- -optimizeForSpeed \
- -landscape \
- -reverse \
- '(-even)-odd' \
- '(-odd)-even' \
- -commentsOff \
- '(-level2 -level3)-level1' \
- '(-level1 -level3)-level2' \
- '(-level1 -level2)-level3' \
- -printerhalftones \
- -saveVM \
- '-scale:integer' \
- -shrink \
- '-size:page size (or custom size wxh in points):(letter tabloid ledger legal executive a3 a4 a5 b4 b5)' \
- '-transQuality:transparency flattening level:(1 2 3 4 5)' \
- '*:PDF file:_files -g "*.(#i)pdf(-.)"' && return
-fi
-
-return 1
diff --git a/Completion/X/Command/_dcop b/Completion/X/Command/_dcop
deleted file mode 100644
index a0329e110..000000000
--- a/Completion/X/Command/_dcop
+++ /dev/null
@@ -1,119 +0,0 @@
-#compdef dcop dcopstart dcopfind dcopref dcopclient dcopobject
-
-local curcontext="$curcontext" desc vals arg base max=0 ret=1
-local app obj fun
-local -a state line expl
-
-case $service in
- dcop(client|object))
- state=( dcopref )
- max=2
- ;;
- dcopref) max=3 ;;
- dcopstart)
- if (( CURRENT > 2 )); then
- _urls && return
- fi
- ;;
- dcopfind)
- local cmd=$words[1]
- _arguments -C \
- '-a[print application id instead of DCOPRef]' \
- '-l[if object not found, run dcopstart and retry]' \
- '*::args:->args' && ret=0
- unset state
- words=( $cmd $words )
- (( CURRENT++ ))
- ;;
-esac
-
-if (( max && CURRENT > max )); then
- _message 'no more arguments'
- return 1
-fi
-
-if [[ -z "$state" ]]; then
- state=(application object function)
- [[ $words[2] = DCOPRef* && CURRENT -ne 2 ]]
- base=$?
- state=( ${state[CURRENT-base]:-arg} )
-
- [[ $state[1] = application && $service = dcop(|find) ]] && state+=( dcopref )
-fi
-
-while (( $#state )); do
- unset app obj fun
-
- if [[ $words[2] = (#b)DCOPRef*\(([^,]#)((#e)|,)([^\\\)]#)(*) ]]; then
- if [[ -n $match[2] ]]; then
- app=$match[1]
- if [[ -n $match[4] ]]; then
- obj=$match[3]
- [[ -n $words[3] && CURRENT -gt 3 ]] && fun=$words[3]
- fi
- fi
- else
- case $CURRENT in
- <5->) fun="$words[4]" ;&
- 4) obj="$words[3]" ;&
- 3) app="$words[2]" ;;
- esac
- fi
- vals=( ${(f)"$(_call_program dcop-$state[1]s ${(M)words[1]##*/}dcop $app $obj 2>/dev/null)"} )
-
- case "$state[1]" in
- application|object)
- [[ -n ${(M)vals:#*\(default\)} ]] && vals+=( default )
- _wanted dcop-$state[1]s expl $state[1] compadd "$@" - ${vals% \(default\)} && ret=0
- ;;
-
- function)
- [[ $service = dcopfind ]] && vals=( ${(M)vals:#bool *} )
- _wanted dcop-$state[1]s expl $state[1] compadd "$@" - ${${vals#* }%\(*} && ret=0
- ;;
-
- arg)
- arg=${${${(M)vals:#*$fun\(*}#*\(}%\)*},
- arg=${${(s.,.)arg}[CURRENT-base-3]}
- if [[ -n $arg ]]; then
- if [[ $arg = (Q(|C)String|*int )* || $arg != *\ * ]]; then
- # don't mention the argument's type
- desc="${arg##* }"
- else
- desc="${arg##* } (${arg% *})"
- fi
- case $arg in
- bool*) _wanted argument expl "$desc" compadd true false && return ;;
- (#i)*(file|path|dir)*) _wanted argument expl "$desc" _files && return ;;
- (#i)*url*) _wanted argument expl "$desc" _urls && return ;;
- *) _message -e argument "$desc" ;;
- esac
- else
- _message 'no more arguments'
- fi
- ;;
-
- dcopref)
- if ! compset -P '*\('; then
- _wanted dcoprefs expl 'dcop ref' compadd -S '' 'DCOPRef(' && ret=0
- elif compset -P '*,'; then
- if compset -S '(|\\)\)*'; then
- set -- -S '' "$@"
- else
- set -- "$@" -S"${${QIPREFIX:+)}:-\)}$compstate[quote] "
- fi
- state+=( object )
- else
- if compset -S ',*'; then
- set -- "$@" -S ''
- else
- set -- "$@" -S ,
- fi
- state+=( application )
- fi
- ;;
- esac
- shift state
-done
-
-return ret
diff --git a/Completion/X/Command/_netscape b/Completion/X/Command/_netscape
deleted file mode 100644
index 78b2da649..000000000
--- a/Completion/X/Command/_netscape
+++ /dev/null
@@ -1,93 +0,0 @@
-#compdef netscape
-
-local curcontext="$curcontext" state line expl ret=1 suf files
-typeset -A opt_args
-
-_x_arguments -C \
- '-xrm:resource:_x_resource' \
- '-help[show usage message]' \
- '-version[show the version number and build date]' \
- '-visual[use a specific server visual]:visual:_x_visual -b' \
- '-install[install a private colormap]' \
- '-no-install[use the default colormap]' \
- '-ncols[max no. of colors to allocate for images]:n:' \
- '-mono[force 1-bit-deep image display]' \
- '-iconic[start up iconified]' \
- '-remote[execute a command in an existing Netscape]:remote command:->remote' \
- '-id[id of X window to send remote commands to]:window-id:' \
- '-raise[raise window following remote command]' \
- "-noraise[don't raise window following remote command]" \
- '-nethelp[show nethelp]' \
- -{dont-force-window-stacking,no-about-splash} \
- -{,no-}{,irix-}session-management \
- -{done-save,ignore}-geometry-prefs \
- -{component-bar,composer,edit,messenger,mail,discussions,news} \
- '*:location:->urls' && ret=0
-
-# Handle netscape remote commands
-if [[ "$state" = "remote" ]]; then
- local -a remote_commands
- remote_commands=(openURL openFile saveAs mailto addBookmark)
-
- compset -P '*\('
- if compset -S '(|\\)\)*'; then
- set - -S "" "$@"
- else
- set - -S"${${QIPREFIX:+)}:-\)}$compstate[quote] " "$@"
- fi
- case $IPREFIX in
- openURL*|addBookmark*) state=urls;;
- openFile*) _files "$@" -W ~;;
- saveAs*)
- if compset -P "*,"; then
- _wanted types expl 'data type' \
- compadd "$@" -M 'm:{a-zA-Z}={A-Za-z}' HTML Text PostScript && ret=0
- else
- compset -S ",*" || suf=","
- _files -qS "$suf" -W ~ && ret=0
- fi
- ;;
- mailto*)
- _email_addresses -s, -c && ret=0
- ;;
- *)
- compset -S '(|\\)\(*' || suf="${${QIPREFIX:+(}:-\(}"
- _wanted commands expl 'remote command' \
- compadd -qS "$suf" -M 'm:{a-zA-Z}={A-Za-z}' -a \
- remote_commands && ret=0
- ;;
- esac
-fi
-
-if [[ "$state" = "urls" ]]; then
- _tags files urls
- while _tags; do
- _requested files expl 'file' _files "$@" && files=yes ret=0
- if _requested urls; then
- # Complete netscape urls
- if compset -P about: ; 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
- elif compset -P mailto: ; then
- _email_addresses -c && 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: news: mailto: mocha: javascript: && ret=0
- done
- (( ret )) || return 0
- done
- [[ -z "$files" ]] && _tags files
- fi
- fi
- (( ret )) || return 0
- done
-fi
-
-return ret