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 | |
parent | 7c2424d02224be21bed940af7249060736e8cc83 (diff) | |
download | zsh-1735ba79183b2d301b92ffb143ed638dfb428821.tar.gz zsh-1735ba79183b2d301b92ffb143ed638dfb428821.tar.xz zsh-1735ba79183b2d301b92ffb143ed638dfb428821.zip |
Motoi Washida: users/8380: complete plist files
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Darwin/Command/_defaults | 16 |
2 files changed, 15 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog index 3077e8f17..2f893602a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-17 Oliver Kiddle <opk@zsh.org> + + * Motoi Washida: users/8380: Completion/Darwin/Command/_defaults: + complete plist files + 2005-01-16 Clint Adams <clint@zsh.org> * 20718: Src/Zle/zle_utils.c: minor cleanup for proto-Unicode 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(){ |