about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Darwin/Command/_defaults5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 697a8ce5f..88102f518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-18  Peter Stephenson  <pws@csr.com>
+
+	* Motoi Washida: users/8522: Completion/Darwin/Command/_defaults:
+	Fix quotation in Darwin completion.
+
 2005-02-16  Peter Stephenson  <pws@csr.com>
 
 	* 20816: Src/Builtins/rlimits.awk: extra tricks to get limit
diff --git a/Completion/Darwin/Command/_defaults b/Completion/Darwin/Command/_defaults
index 8723c605f..0ecd2ad2f 100644
--- a/Completion/Darwin/Command/_defaults
+++ b/Completion/Darwin/Command/_defaults
@@ -14,9 +14,10 @@ _defaults_domains(){
 }
 
 _defaults_keys(){
-  local ks="$(_call_program keys defaults read "$words[2]" 2>/dev/null | sed '/^    [[:alpha:]"]/ { s/^    //; s/ = .*$//; p;}; d')"
+  local ks
+  ks=(${${${${(M)${(f)"$(defaults read "$words[2]" 2>/dev/null)"}:# [^ ]*=*}# }%% = *}:Q})
   local expl
-  _wanted keys expl 'key' compadd ${(f)ks}
+  _wanted keys expl 'key' compadd "$ks[@]"
 }
 
 _defaults(){