diff --git a/home/shell.nix b/home/shell.nix index ac2ee42..71a2b64 100644 --- a/home/shell.nix +++ b/home/shell.nix @@ -240,6 +240,7 @@ in check = "~/Config/scripts/test"; nfc = "nix flake check -L"; ff = "fastfetch --logo none"; + p3 = "python3"; # System Navigation ".." = "cd .."; diff --git a/home/shell/git.sh b/home/shell/git.sh index e7fb08c..69ec7fa 100644 --- a/home/shell/git.sh +++ b/home/shell/git.sh @@ -2,8 +2,7 @@ # 🌟 Custom Git Automation & Helper Utilities # Sourced in .bashrc to streamline gitignore modifications, commit-push workflows, and new repo setups. -# 1. gitignore: Quickly appends patterns to the repository's root .gitignore file -# then automatically commits and pushes the change. +# 1. gitignore: Quickly appends patterns to the repository's root .gitignore file. gitignore() { if [ $# -eq 0 ]; then echo "Usage: gitignore [pattern...]" @@ -30,7 +29,6 @@ gitignore() { fi local added_count=0 - local commit_msg_list="" for pattern in "$@"; do # Check if the pattern is already present in the .gitignore file @@ -40,18 +38,10 @@ gitignore() { echo "$pattern" >> "$GIT_IGNORE_FILE" echo "Added '$pattern'" ((added_count++)) - commit_msg_list+="${pattern}, " fi done - # If any patterns were added, commit and push them automatically - if [ $added_count -gt 0 ]; then - commit_msg_list="${commit_msg_list%, }" - echo "Committing and pushing changes..." - git add "$GIT_IGNORE_FILE" - git commit -m "Add to .gitignore: $commit_msg_list" - git push - else + if [ "$added_count" -eq 0 ]; then echo "No new patterns were added." fi }