summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_tar2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c440f6e9..431a4c8d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-10-10  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 22860: Completion/Unix/Command/_tar: allow - before first
+	argument of tar.
+
 	* 22859: Completion/Base/Utility/_arguments: improved to
 	handle all descriptions for zsh configure and GNU tar.
 
diff --git a/Completion/Unix/Command/_tar b/Completion/Unix/Command/_tar
index f24605b3c..2958b5957 100644
--- a/Completion/Unix/Command/_tar
+++ b/Completion/Unix/Command/_tar
@@ -154,6 +154,8 @@ elif [[ ( "$_tar_cmd" = *[xt]* || -n $del ) && -n "$tf" ]]; then
 
   _wanted files expl 'file from archive' _multi_parts / _tar_cache_list
 elif (( CURRENT == 2 )); then
+  # ignore leading - since we complete option letters anyway
+  compset -P -
   _values -s '' 'tar function' \
     '(c t u x)A[append to an archive]' \
     '(A t u x)c[create a new archive]' \