aboutsummaryrefslogtreecommitdiff
path: root/completion/make.sh
blob: dd00d0513a8530e12231a59f93f602f4a8b231a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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'