Add code for commit function.

This commit is contained in:
2025-11-28 14:07:34 -07:00
parent c36a689d8f
commit 4a9cd06654

View File

@@ -1032,7 +1032,27 @@
alias flatpak-clean="flatpak uninstall --unused"
alias_commit: |
# TBD function to git add, git commit, and git push in a single go.
# Already exists on Termux env.
# Already exists on Termux env. Needs tested.
function commit_usage {
echo 'Usage: commit "This is a commit message"'
}
function commit {
if [[ -z "$1" ]]; then
echo "ERROR: Message must be provided."
commit_usage
return 1
fi
if [[ "$1" == "-h"* || "$1" == "--h"* ]]; then
commit_usage
fi
message="$1"
git add . &&
git commit -m "$message" &&
git push
status="$?"
return "$status"
}
- name: General | Account Management | Users | Files | Common Variable
set_fact: