summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_composer4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 696bb2f2f..1dc27f33d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-12  dana  <dana@dana.is>
+
+	* 44681 (tweaked): Completion/Unix/Command/_composer: Eliminate
+	questionable eval, fix quoting issue
+
 2019-10-10  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* unposted: Src/builtin.c: functions -c: Fix typo
diff --git a/Completion/Unix/Command/_composer b/Completion/Unix/Command/_composer
index 2b9f2cd32..1cd3f3561 100644
--- a/Completion/Unix/Command/_composer
+++ b/Completion/Unix/Command/_composer
@@ -40,7 +40,7 @@ __composer_call() {
 
   __composer_update_work_dir
 
-  cmd=( ${_composer_cmd:-composer} -d${_composer_work_dir:-${(q)PWD}} )
+  cmd=( ${_composer_cmd:-composer} -d${(q)${_composer_work_dir:-$PWD}} )
   (( _composer_is_global )) && cmd+=( global )
 
   _call_program $1 $cmd "${@[2,-1]}"
@@ -115,7 +115,7 @@ __composer_prune_global_opts() {
 (( $+functions[__composer_update_work_dir] )) ||
 __composer_update_work_dir() {
   if [[ -n ${(v)opt_args[(i)(-d|--working-dir)]} ]]; then
-    eval _composer_work_dir=${(v)opt_args[(i)(-d|--working-dir)]}
+    _composer_work_dir=${(Q)${(v)opt_args[(i)(-d|--working-dir)]}}
   elif [[ -z $_composer_work_dir ]]; then
     _composer_work_dir=$PWD
   fi