From 9f5a6b7b7b0a647438b0b256714d576568e4f660 Mon Sep 17 00:00:00 2001 From: James Mills <1290234+prologic@users.noreply.github.com> Date: Sat, 1 Apr 2023 16:20:11 +1000 Subject: [PATCH] Fix onthispage plugin --- .zs/list | 2 ++ .zs/onthispage | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.zs/list b/.zs/list index ace7f3d..e46c07a 100755 --- a/.zs/list +++ b/.zs/list @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ ! $# = 1 ]; then printf >&2 "Usage: %s [ext]\n" "$(basename "$0")" exit 0 diff --git a/.zs/onthispage b/.zs/onthispage index 1b6df8e..f7162cc 100755 --- a/.zs/onthispage +++ b/.zs/onthispage @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash + +set -eo pipefail { echo "**On this page**" echo - toc -a=false -d 2 -s 1 -p "$ZS_FILE" + toc -d 2 -s 1 "$ZS_FILE" } | zs gen