From 98f90bced5ff053f3e2546175ffc3ecb72f561f9 Mon Sep 17 00:00:00 2001 From: Dan Reif Date: Mon, 16 Apr 2018 11:31:57 -0700 Subject: Allow disabling of individual ftdetect rules via g:polyglot_disabled --- build | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'build') diff --git a/build b/build index 42a121db..3ba0f711 100755 --- a/build +++ b/build @@ -59,14 +59,16 @@ extract() { continue fi - for f in ${dir}/ftdetect/*; do - ( - echo "augroup filetypedetect"; - echo '" '"$pack"; - cat "${f}"; - echo "augroup END"; - echo - ) >> tmp/polyglot.vim; + for f in "${dir}/ftdetect/"*; do + cat <> tmp/polyglot.vim +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '${pack%%:*}') == -1 + augroup filetypedetect + " ${pack%%:*}, from ${f##*/ftdetect/} in ${pack#*:} +$(cat "${f}") + augroup end +endif + +EOF done done -- cgit v1.2.3