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

local nm=$compstate[nmatches] ret=1

compgen -M 'L:|[nN][oO]= M:_= M:{A-Z}={a-z}' \
         -s '$({ unsetopt kshoptionprint; setopt } 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