1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-26 04:52:53 +03:00

Use POSIX -E of sed for extended regular expressions

This commit is contained in:
Alex Leferry 2 2020-01-21 14:45:33 +01:00
parent 2749093143
commit 2f05aebfff
2 changed files with 3 additions and 3 deletions

View File

@ -88,12 +88,12 @@ The syntaxic errors detected during parsing are shown when auto-diagnostics are
printf %s\\n "evaluate-commands -client ${kak_client} echo 'clang parsing done'" | kak -p ${kak_session}
fi
flags=$(cat ${dir}/stderr | sed -rne "
flags=$(cat ${dir}/stderr | sed -Ene "
/^<stdin>:[0-9]+:([0-9]+:)? (fatal )?error/ { s/^<stdin>:([0-9]+):.*/'\1|{red}█'/; p }
/^<stdin>:[0-9]+:([0-9]+:)? warning/ { s/^<stdin>:([0-9]+):.*/'\1|{yellow}█'/; p }
" | paste -s -d ' ' -)
errors=$(cat ${dir}/stderr | sed -rne "
errors=$(cat ${dir}/stderr | sed -Ene "
/^<stdin>:[0-9]+:([0-9]+:)? ((fatal )?error|warning)/ {
s/'/''/g; s/^<stdin>:([0-9]+):([0-9]+:)? (.*)/'\1|\3'/; p
}" | sort -n | paste -s -d ' ' -)

View File

@ -88,7 +88,7 @@ define-command ctags-funcinfo -docstring "Display ctags information about a sele
f=${kak_selection%?}
sig='\tsignature:(.*)'
csn='\t(class|struct|namespace):(\S+)'
sigs=$(${kak_opt_readtagscmd} -e -Q '(eq? $kind "f")' "${f}" | sed -re "s/^.*${csn}.*${sig}$/\3 [\2::${f}]/ ;t ;s/^.*${sig}$/\1 [${f}]/")
sigs=$(${kak_opt_readtagscmd} -e -Q '(eq? $kind "f")' "${f}" | sed -Ee "s/^.*${csn}.*${sig}$/\3 [\2::${f}]/ ;t ;s/^.*${sig}$/\1 [${f}]/")
if [ -n "$sigs" ]; then
printf %s\\n "evaluate-commands -client ${kak_client} %{info -anchor $kak_cursor_line.$kak_cursor_column -style above '$sigs'}"
fi