From 9d2e991224eb4ed82634abefc5d6cd12f62c24df Mon Sep 17 00:00:00 2001 From: Spencer Date: Wed, 11 Feb 2026 12:11:43 -0500 Subject: [PATCH] adding bashrc.d functions --- README.md | 1 - setup-bashrc.sh | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 setup-bashrc.sh diff --git a/README.md b/README.md index 8fe1fc5..4ae697a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ # env-files [lsp-examples](https://github.com/ycm-core/lsp-examples/tree/master) - diff --git a/setup-bashrc.sh b/setup-bashrc.sh new file mode 100644 index 0000000..ea7e0c5 --- /dev/null +++ b/setup-bashrc.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +mkdir -p ~/.bashrc.d + +cat <<'EOF'>~/.bashrc.d/functions +# sample functions + +## simple alias +alias k=kubectl + +function check-commit { + echo "Running markdownlint" + docker run -u "$(id -u)" --rm -it -v "$(pwd):/data:Z" docker.io/markdownlint/markdownlint:latest . + echo "Running cspell" + cspell + # docker run --rm -it -v "$(pwd):/workdir" --entrypoint="" quay.io/terraform-docs/terraform-docs:0.17.0 sh + # terraform-docs markdown --anchor=false --html=false table --sort-by required +} + +alias cspell="docker run --rm -it -v \"\$(pwd):/workdir:Z\" ghcr.io/streetsidesoftware/cspell:latest \"**\"" +alias cspell-ignore="cspell | grep -o \"Unknown word (.*)\" | sed -E 's|.*\((.*)\).*|\1|' | sort | uniq | sed -r 's/\\x1B\\[(;?[0-9]{1,3})+[mGK]//g'" +EOF