about summary refs log tree commit diff
path: root/Completion/X/_x_arguments
blob: cf0fe2ebe010c571538feed6a23625ad7a6743de (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/*

local ret long xargs

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

(( $# )) || xargs=( "$xargs[@]" '*:files: _files' )

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

_arguments "$@"

ret=$?

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

return ret