Files
git.taskfile.build/bin/load-dotenv-from-pass
T
Janik von Rotz fa48eda0c0 feat(aliases): implement first-letter shorthand aliases for all bin scripts with collision handling
- Added alias functions to all bin scripts using first-letter pattern (e.g., `av` for `activate-venv`, `cwl` for `commit-with-llm`)
- Implemented collision resolution by extending aliases with additional letters when conflicts occur or when shadowing standard shell commands
- Documented alias implementation approach in library.md with complete alias map for reference
- Verified shell syntax with `bash -n` and ensured proper argument passing with `"$@"`
- Updated prompt frontmatter to reflect completed state and model used (infomaniak/moonshotai/Kimi-K2.6)
2026-07-08 15:42:22 +02:00

20 lines
474 B
Bash
Executable File

#!/usr/bin/env bash
load-dotenv-from-pass() {
PASS_ENTRY=$(echo "dotenv/${PWD##*/}#$(git symbolic-ref --short -q HEAD)" | tr '[:upper:]' '[:lower:]')
DOTENV=".env"
if [[ -n "$1" ]]; then
DOTENV="$1"
fi
if pass find "$PASS_ENTRY" >/dev/null; then
echo "Restore $DOTENV file from pass: $PASS_ENTRY"
pass show "$PASS_ENTRY" > $DOTENV
else
echo "Pass entry not found."
fi
}
ldfp() {
load-dotenv-from-pass "$@"
}