Improve POSIX sed compatibility in lint.kak

Fixes #1072
This commit is contained in:
Maxime Coste 2017-01-31 22:42:43 +00:00
parent 6a0354a597
commit 6e39e8371a

View File

@ -61,7 +61,7 @@ def lint -docstring 'Parse the current buffer with a linter' %{
} }
def -hidden lint-show %{ %sh{ def -hidden lint-show %{ %sh{
desc=$(printf '%s\n' "$kak_opt_lint_errors" | sed -ne "/^$kak_cursor_line,.*/ { s/^[[:digit:]]\+,[[:digit:]]\+,//g; s/'/\\\\'/g; p; }") desc=$(printf '%s\n' "$kak_opt_lint_errors" | sed -ne "/^$kak_cursor_line,.*/ { s/^[[:digit:]]*,[[:digit:]]*,//g; s/'/\\\\'/g; p; }")
if [ -n "$desc" ]; then if [ -n "$desc" ]; then
printf '%s\n' "info -anchor $kak_cursor_line.$kak_cursor_column '$desc'" printf '%s\n' "info -anchor $kak_cursor_line.$kak_cursor_column '$desc'"
fi fi