- 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)
25 lines
651 B
Bash
Executable File
25 lines
651 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
get-pass-from-keepass() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
local keepass_entry="$1"
|
|
|
|
if [[ ! -f "$KEEPASS_DATABASE_FILE" ]]; then
|
|
echo "Keepass database file not found: $KEEPASS_DATABASE_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -f "$KEEPASS_DATABASE_KEY_FILE" ]]; then
|
|
echo "Keepass database key file not found: $KEEPASS_DATABASE_KEY_FILE"
|
|
exit 1
|
|
fi
|
|
|
|
keepassxc-cli show --show-protected --attributes Password \
|
|
--key-file "$KEEPASS_DATABASE_KEY_FILE" \
|
|
"$KEEPASS_DATABASE_FILE" \
|
|
"$keepass_entry"
|
|
}
|
|
gpfk() {
|
|
get-pass-from-keepass "$@"
|
|
}
|