Skip to content

Commit

Permalink
pass args to command
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Dec 4, 2024
1 parent c662419 commit 5621946
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
- id: md-toc
name: Markdown Table of Contents
entry: >-
bash -eu -o pipefail -c
"echo ARGS: \"$@\"; for f in $@; do
[ -f \"$f\" ] && markdown-toc -i $f;
bash -xeu -o pipefail -c
"MDTOC_ARGS=\"\";
for f in $@; do
[[ \"x$f\" = x--* ]] && MDTOC_ARGS=\"$f $MDTOC_ARGS\" && continue;
[ -f \"$f\" ] && markdown-toc $MDTOC_ARGS -i $f;
done"
language: system

0 comments on commit 5621946

Please sign in to comment.