about summary refs log tree commit diff
path: root/Completion/Darwin
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Darwin')
-rw-r--r--Completion/Darwin/Command/_defaults5
1 files changed, 3 insertions, 2 deletions
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(){