diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2005-01-17 09:39:17 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2005-01-17 09:39:17 +0000 |
commit | 1735ba79183b2d301b92ffb143ed638dfb428821 (patch) | |
tree | ec1a364c7394b9ad3f6400f02f5e67572ca120e4 /Completion/Darwin | |
parent | 7c2424d02224be21bed940af7249060736e8cc83 (diff) | |
download | zsh-1735ba79183b2d301b92ffb143ed638dfb428821.tar.gz zsh-1735ba79183b2d301b92ffb143ed638dfb428821.tar.xz zsh-1735ba79183b2d301b92ffb143ed638dfb428821.zip |
Motoi Washida: users/8380: complete plist files
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(){ |