- 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
654 B
Bash
Executable File
26 lines
654 B
Bash
Executable File
#!/bin/bash
|
|
|
|
remove-git-folder() {
|
|
if [[ -z "$1" ]]; then echo "\$1 is empty."; exit; fi
|
|
local git_folders=$(ls-git-folder "$1")
|
|
|
|
echo "Delete: $git_folders"
|
|
read -p "Are you sure to delete these git folder(s)? (yes/N): " confirm
|
|
if [[ "${confirm,,}" != "yes" ]]; then
|
|
echo 'Aborted.'
|
|
return 1
|
|
fi
|
|
for git_folder in $git_folders; do
|
|
echo "Remove $git_folder from .gitmodules file."
|
|
git config --file .gitmodules --remove-section "submodule.$git_folder"
|
|
|
|
echo "Delete git folder $git_folder."
|
|
rm -rf "$git_folder"
|
|
done
|
|
|
|
save-version
|
|
}
|
|
rgf() {
|
|
remove-git-folder "$@"
|
|
}
|