- 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)
26 lines
676 B
Bash
Executable File
26 lines
676 B
Bash
Executable File
#!/bin/bash
|
|
|
|
save-git-folder() {
|
|
echo "Saving git commit hashes as 'commit' in .gitmodules."
|
|
local git_folders=$(ls-git-folder .)
|
|
|
|
for git_folder in $git_folders; do
|
|
local commit_hash=$(git -C "$git_folder" rev-parse HEAD 2>/dev/null)
|
|
if [[ -z "$commit_hash" ]]; then
|
|
echo "Could not get commit for $git_folder"
|
|
continue
|
|
fi
|
|
|
|
local submodule_name="$git_folder"
|
|
|
|
git config -f .gitmodules submodule."$submodule_name".commit "$commit_hash"
|
|
|
|
echo "Set commit for $submodule_name: $commit_hash"
|
|
done
|
|
|
|
echo "All submodule commits saved to .gitmodules."
|
|
}
|
|
sgf() {
|
|
save-git-folder "$@"
|
|
}
|