From eea511f22d2ed9dfbf4ace2aa344e7299ae8c3e7 Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Mon, 27 Mar 2023 18:05:41 -0400 Subject: xchangelog: view with mdcat if no PAGER and file is markdown assuming mdcat is installed --- xchangelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xchangelog b/xchangelog index 8f25228..77a0753 100755 --- a/xchangelog +++ b/xchangelog @@ -29,6 +29,8 @@ if ! [ -t 1 ]; then elif curl -sI -w "%{content_type}" -o /dev/null -- "$changelog" | grep -qi "^text/plain"; then if [ -n "$PAGER" ]; then curl -s -- "$changelog" | "$PAGER" + elif [[ "$changelog" = *".md" ]] && type mdless >/dev/null; then + curl -s -- "$changelog" | mdless elif type less >/dev/null; then curl -s -- "$changelog" | less else -- cgit 1.4.1