From e10f1e53fcb1869c9fb72f42e6c40b722e512c37 Mon Sep 17 00:00:00 2001 From: Leira Hua Date: Sun, 18 Dec 2016 23:18:15 -0800 Subject: [PATCH] fixed clang-complete on macOS, paste command need - to read from stdin --- rc/extra/clang.kak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/extra/clang.kak b/rc/extra/clang.kak index 3da9f914..2a4d6f50 100644 --- a/rc/extra/clang.kak +++ b/rc/extra/clang.kak @@ -73,7 +73,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are gsub(/[^[:alnum:]{}_]+/, "{operator}&{}", menu) print id "|" docstrings[id] "|" menu } - }' | paste -s -d ':' | sed -e "s/\\\\n/\\n/g; s/'/\\\\'/g") + }' | paste -s -d ':' - | sed -e "s/\\\\n/\\n/g; s/'/\\\\'/g") printf %s\\n "eval -client ${kak_client} echo 'clang completion done' set 'buffer=${kak_buffile}' clang_completions '${header}:${compl}'" | kak -p ${kak_session} else @@ -84,7 +84,7 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are flags=$(cat ${dir}/stderr | sed -rne " /^:[0-9]+:([0-9]+:)? (fatal )?error/ { s/^:([0-9]+):.*/\1|{red}█/; p } /^:[0-9]+:([0-9]+:)? warning/ { s/^:([0-9]+):.*/\1|{yellow}█/; p } - " | paste -s -d ':') + " | paste -s -d ':' -) errors=$(cat ${dir}/stderr | sed -rne " /^:[0-9]+:([0-9]+:)? ((fatal )?error|warning)/ { s/^:([0-9]+):([0-9]+:)? (.*)/\1,\3/; s/'/\\\\'/g; p }