[Bash-completion-devel] [PATCH] make completion shouldn't be confused by the output of $(info confuse: make)

Tristan Wibberley tristan.wibberley at gmail.com
Sun May 18 13:10:50 UTC 2014


Currently, make completion will parse the output of $(info ...) looking for
make targets. It's too easy to cause extra targets to be suggested by
accident. This patch makes completion ignore lines that appear before the
database output begins.

---
 completions/make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/completions/make b/completions/make
index b6683b8..f8f7193 100644
--- a/completions/make
+++ b/completions/make
@@ -20,7 +20,7 @@ function _make_target_extract_script()
     fi

     cat <<EOF
-    /^# Make data base/,/^# Files/d;            # skip until files section
+    1,/^# Files/                  d;            # skip until files section
     /^# Not a target/,/^$/        d;            # skip not target blocks
     /^${prefix_pat}/,/^$/!        d;            # skip anything user dont want

-- 
1.9.1



More information about the Bash-completion-devel mailing list