about summary refs log tree commit diff
path: root/Completion/Commands/_expand_word
blob: 89569567640e9e5308bab66a630d6c4f90b3778c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#compdef -K _expand_word complete-word \C-xe _list_expansions list-choices \C-xd

# Simple completion front-end implementing expansion.

setopt localoptions nullglob rcexpandparam extendedglob unset
unsetopt markdirs globsubst shwordsplit shglob ksharrays cshnullglob

local curcontext="$curcontext"

if [[ -z "$curcontext" ]]; then
  curcontext="expand-word:::"
else
  curcontext="expand-word:${curcontext#*:}"
fi

_main_complete _expand