about summary refs log tree commit diff
path: root/Completion/X/_x_arguments
blob: 08ed5f8ac9f8ceb7be7ab39e22c4fdd7f656b97a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#compdef -P */X11(|R[456])/*

local ret long xargs

xargs=(
  '-display:display:_x_display'
  '-geometry:geometry:_x_geometry'
)

(( $# )) || xargs=( "$xargs[@]" '*:default: _default' )

long=$argv[(I)--]
if (( long )); then
  argv[long]=( "$xargs[@]" -- )
else
  set -- "$@" "$xargs[@]"
fi

_arguments "$@"

ret=$?

[[ "$ret" = 300 ]] && compstate[restore]=''

return ret