bash-completion/0352-_longopt-don-t-complete-no-with-file-dirname-arg.patch

35 lines
949 B
Diff
Raw Normal View History

2019-09-30 10:32:16 -04:00
From dd80f35279afd4f056dc191767b9869c9649d476 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Mon, 11 Mar 2019 21:26:24 +0200
Subject: [PATCH 352/352] _longopt: don't complete --no-* with file/dirname arg
Closes https://github.com/scop/bash-completion/pull/291
Thanks-to: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
---
bash_completion | 4 ++--
test/t/test_grep.py | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/bash_completion b/bash_completion
index a2f0a74..d35858e 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1850,11 +1850,11 @@ _longopt()
--help|--usage|--version)
return
;;
- --*dir*)
+ --!(no-*)dir*)
_filedir -d
return
;;
- --*file*|--*path*)
+ --!(no-*)@(file|path)*)
_filedir
return
;;
--
1.8.3.1