- 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)
24 lines
515 B
Bash
Executable File
24 lines
515 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
template-dotenv() {
|
|
local template=".env.template"
|
|
local output=".env"
|
|
|
|
if [[ ! -f "$template" ]]; then
|
|
echo "Template file '$template' not found."
|
|
return 1
|
|
fi
|
|
|
|
echo "Append to .env from $template."
|
|
while IFS= read -r line || [[ -n "$line" ]]; do
|
|
if [[ "$line" =~ \$\(.+\) ]]; then
|
|
eval "echo $line" >> "$output"
|
|
else
|
|
echo "$line" >> "$output"
|
|
fi
|
|
done < "$template"
|
|
}
|
|
td() {
|
|
template-dotenv "$@"
|
|
}
|