diff options
author | classabbyamp <void@placeviolette.net> | 2023-03-27 18:05:41 -0400 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2023-03-28 19:49:26 +0200 |
commit | eea511f22d2ed9dfbf4ace2aa344e7299ae8c3e7 (patch) | |
tree | 255bd16044875147b98b592dbcbfaa28c4660f01 | |
parent | e27949702d25bbe0e9153cf3afea158104c0c383 (diff) | |
download | xtools-eea511f22d2ed9dfbf4ace2aa344e7299ae8c3e7.tar.gz xtools-eea511f22d2ed9dfbf4ace2aa344e7299ae8c3e7.tar.xz xtools-eea511f22d2ed9dfbf4ace2aa344e7299ae8c3e7.zip |
xchangelog: view with mdcat if no PAGER and file is markdown
assuming mdcat is installed
-rwxr-xr-x | xchangelog | 2 |
1 files changed, 2 insertions, 0 deletions
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 |