diff --git a/rc/core/doc.kak b/rc/core/doc.kak index 1dab36c8..5d967f11 100644 --- a/rc/core/doc.kak +++ b/rc/core/doc.kak @@ -8,7 +8,7 @@ def -hidden -params 1..2 doc-open %{ # This option is handled by the `man-db` implementation export MANWIDTH=${kak_window_width} - if man "$1" > "${manout}"; then + if man "$1" > "${manout}" 2>/dev/null; then readonly manout_noescape=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) sed -e $(printf 's/.\x8//g') -e 's,\x1B\[[0-9;]*[a-zA-Z],,g' "${manout}" > "${manout_noescape}" diff --git a/rc/core/man.kak b/rc/core/man.kak index 6533fa68..40388bff 100644 --- a/rc/core/man.kak +++ b/rc/core/man.kak @@ -30,7 +30,7 @@ hook global WinSetOption filetype=(?!man).* %{ def -hidden -params 1..2 man-impl %{ %sh{ manout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) colout=$(mktemp "${TMPDIR:-/tmp}"/kak-man-XXXXXX) - MANWIDTH=${kak_window_width} man "$@" > $manout + MANWIDTH=${kak_window_width} man "$@" > $manout 2>/dev/null retval=$? col -b -x > ${colout} < ${manout} rm ${manout}