diff options
Diffstat (limited to 'Completion/Darwin')
-rw-r--r-- | Completion/Darwin/Command/_defaults | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Completion/Darwin/Command/_defaults b/Completion/Darwin/Command/_defaults index 0c17c9e69..8723c605f 100644 --- a/Completion/Darwin/Command/_defaults +++ b/Completion/Darwin/Command/_defaults @@ -1,12 +1,16 @@ #compdef defaults _defaults_domains(){ - local str="$(_call_program domains defaults domains 2>/dev/null)" - local expl - local -a list - list=( ${(s/, /)str} -g -globalDomain ) - _wanted domains expl 'defaults database domain' \ - compadd -M 'r:|.=* r:|=*' -a list + if [[ "`eval echo $PREFIX`" != [/~]* ]]; then + local str="$(_call_program domains defaults domains 2>/dev/null)" + local expl + local -a list + list=( ${(s/, /)str} -g -globalDomain ) + _wanted domains expl 'defaults database domain' \ + compadd -M 'r:|.=* r:|=*' -a list + else + _files -g '*.plist(e:"reply=\${REPLY%.plist}":)' + fi } _defaults_keys(){ |