| 1 | |
| 2 | echo -e "\e[38;5;118mAdding and committing all changes" |
| 3 | git add --all |
| 4 | message="$@" |
| 5 | push=false |
| 6 | |
| 7 | if [[ "$message" =~ "-p" ]]; then |
| 8 | message=$(echo "$message" | sed 's/-p//g') |
| 9 | push=true |
| 10 | fi |
| 11 | |
| 12 | if [[ "$message" =~ "'" ]]; then |
| 13 | git commit -m "$message" |
| 14 | else |
| 15 | git commit -m "'$message'" |
| 16 | fi |
| 17 | |
| 18 | echo -e "\e[0m" |
| 19 | |
| 20 | if [[ "$push" == true ]]; then |
| 21 | echo -e "\e[38;5;126mPushing to remote" |
| 22 | git push |
| 23 | echo -e "\e[0m" |
| 24 | fi |