about summary refs log tree commit diff
path: root/Completion/Builtins/_setopt
blob: b458cb2b008fa3026b3d003033f88c0ebf78f708 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#defcomp setopt

local nm=$compstate[nmatches] ret=1

compgen -M 'L:|[nN][oO]= M:_= M:{A-Z}={a-z}' \
         -s '$({ unsetopt kshoptionprint; unsetopt } 2>/dev/null)' && ret=0

[[ compstate[nmatches] -eq nm ]] &&
    compgen -M 'L:|[nN][oO]= M:_= M:{A-Z}={a-z}' -o && ret=0

return ret