about summary refs log tree commit diff
diff options
context:
space:
mode:
authorclassabbyamp <void@placeviolette.net>2023-05-03 03:44:06 -0400
committerLeah Neukirchen <leah@vuxu.org>2023-05-03 14:21:47 +0200
commite3b12cbffe3fdcdf7fe355f2bcb70ab5a0c50f38 (patch)
tree3b8b09a9b05a246f65ff0c4aa78c844a31cb6a1f
parent69187b4017ad720819247d7e067dce22f0cfd472 (diff)
downloadxtools-e3b12cbffe3fdcdf7fe355f2bcb70ab5a0c50f38.tar.gz
xtools-e3b12cbffe3fdcdf7fe355f2bcb70ab5a0c50f38.tar.xz
xtools-e3b12cbffe3fdcdf7fe355f2bcb70ab5a0c50f38.zip
xchangelog: view ReST with rst2ansi if available
rs2ansi is from python3-rst2ansi
-rwxr-xr-xxchangelog2
1 files changed, 2 insertions, 0 deletions
diff --git a/xchangelog b/xchangelog
index 0fb08d4..def9fe1 100755
--- a/xchangelog
+++ b/xchangelog
@@ -31,6 +31,8 @@ elif curl -sLI -w "%{content_type}" -o /dev/null -- "$changelog" | grep -qi "^te
 		curl -sL -- "$changelog" | "$PAGER"
 	elif [[ "$changelog" = *".md" ]] && type mdless >/dev/null; then
 		curl -sL -- "$changelog" | mdless
+	elif [[ "$changelog" = *".rst" ]] && type rst2ansi >/dev/null; then
+		curl -sL -- "$changelog" | rst2ansi | less -r
 	elif type less >/dev/null; then
 		curl -sL -- "$changelog" | less
 	else