--
Motoi Washida
Index: Completion/Darwin/Command/_defaults
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Darwin/Command/_defaults,v
retrieving revision 1.1
diff -d -u -r1.1 _defaults
--- Completion/Darwin/Command/_defaults 23 Jul 2004 13:38:12 -0000 1.1
+++ Completion/Darwin/Command/_defaults 16 Jan 2005 15:43:35 -0000
@@ -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(){