about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2022-12-24 11:17:16 +0000
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2022-12-30 20:48:48 +0000
commitbc7511bdd887cfda7eb45e8009de079d35c4d7f1 (patch)
tree8c18b7c0809db7ee57946e0517ba6f3411760a3a
parent35a2f155c3b92e67957325e1f49e409546378e3e (diff)
downloadzsh-bc7511bdd887cfda7eb45e8009de079d35c4d7f1.tar.gz
zsh-bc7511bdd887cfda7eb45e8009de079d35c4d7f1.tar.xz
zsh-bc7511bdd887cfda7eb45e8009de079d35c4d7f1.zip
51249: use of --force-local with tar completion
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_tar2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 130bec319..0771c2719 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-12-30  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* Daniel: 51249: Completion/Unix/Command/_tar: copy
+	--force-local option as needed for file names.
+
 2022-12-16  Oliver Kiddle  <opk@zsh.org>
 
 	* 51214: Doc/Zsh/builtins.yo, Src/builtin.c, Test/B04read.ztst,
diff --git a/Completion/Unix/Command/_tar b/Completion/Unix/Command/_tar
index f9901c0c9..1cabd9713 100644
--- a/Completion/Unix/Command/_tar
+++ b/Completion/Unix/Command/_tar
@@ -158,7 +158,7 @@ elif [[ ( "$_tar_cmd" = *[xt]* || -n $del ) && -n "$tf" ]]; then
   fi
 
   if [[ $tf != $_tar_cache_name && -f $tf ]]; then
-    _tar_cache_list=("${(@f)$($words[1] $largs $tf)}")
+    _tar_cache_list=("${(@f)$($words[1] ${words[(r)--force-local]} $largs $tf)}")
     _tar_cache_name=$tf
   fi