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