carapace-bin/.github/macros.sh
2024-03-11 19:32:42 +01:00

13 lines
550 B
Bash

#!/bin/sh
scriptdir=$(dirname $(readlink -f $0))
echo "# Macros"
echo
$scriptdir/../cmd/carapace/carapace --macro \
| sed -r 's_(https://[^ ]+)_[\1](\1)_' \
| sed 's_^\([^ ]*\.\)\([^. ]\+\) \+\(.*\)_- [\1\2]\(https://pkg.go.dev/github.com/carapace-sh/carapace-bin/pkg/actions/\1#Action\2) \3_' \
| sed -e ':loop' -e 's_\(carapace-bin/pkg/actions/[^#]*\)[.]_\1/_' -e 't loop' \
| sed 's_https://pkg.go.dev/github.com/carapace-sh/carapace-bin/pkg/actions/bridge_https://pkg.go.dev/github.com/carapace-sh/carapace-bridge/pkg/actions/bridge_'