aboutsummaryrefslogtreecommitdiff
path: root/completion/make.sh
diff options
context:
space:
mode:
authorkitsunyan2018-03-10 21:10:43 +0000
committerkitsunyan2018-03-10 21:10:43 +0000
commitfd397b356e9be1d3572ace965ead57120803a0ac (patch)
treed9e6fe9f903ab935fa6df2e6862a97515caf926c /completion/make.sh
Initial commitv0.1
Diffstat (limited to 'completion/make.sh')
-rwxr-xr-xcompletion/make.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/completion/make.sh b/completion/make.sh
new file mode 100755
index 0000000..dd00d05
--- /dev/null
+++ b/completion/make.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+pacman_bash_completion='/usr/share/bash-completion/completions/pacman'
+
+(IFS=; while read -r line; do
+ [ "${line:0:12}" = 'make_import ' ] && {
+ grep -Poz '(?<=\n)'"${line:12}"'\(\) \{\n(.*\n)*?\}' "$pacman_bash_completion" |
+ xargs -0
+ } || {
+ echo "$line"
+ }
+done) < 'bash.in' > 'bash'