- 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)
28 lines
601 B
Bash
Executable File
28 lines
601 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
add-git-remote() {
|
|
if [[ -z "$1" ]]; then
|
|
echo '$1/remote is empty.' >&2
|
|
exit 1
|
|
fi
|
|
if [[ -z "$2" ]]; then
|
|
echo '$2/url is empty.' >&2
|
|
exit 1
|
|
fi
|
|
if [[ -z "$3" ]]; then
|
|
echo '$3/path is empty.' >&2
|
|
exit 1
|
|
fi
|
|
|
|
local remote_name="$1"
|
|
local remote_url="$2"
|
|
local submodule_path="$3"
|
|
|
|
git -C "$submodule_path" remote add "$remote_name" "$remote_url" 2>/dev/null || true
|
|
|
|
git config -f .gitmodules --add remotes."$submodule_path"."$remote_name" "$remote_url"
|
|
}
|
|
agr() {
|
|
add-git-remote "$@"
|
|
}
|