README.MD typo fix

Aliases
- Moved to appropriately named file
- Added aliases for copying git-template and prettier-template
- Fix to git_push_all_changes function

Nvims
- Compacted the function

Project Access
- pnew() updated to clone remore repo or create a new one from scratch depending on options provided
This commit is contained in:
Pratik Tripathy
2024-03-06 16:09:39 +05:30
parent 1723bf8084
commit ca49dcafc2
6 changed files with 46 additions and 39 deletions

View File

@@ -2,11 +2,16 @@
# Git
git_push_all_changes() {
if [ "$1" = "" ]; then
echo "Please provide a commit message."
return 126
fi
git add . && git commit -am "${1}" && git push
}
alias git_just_push=git_push_all_changes
alias cd_root='cd $(git rev-parse --show-toplevel 2>/dev/null || echo ".")'
alias cd_git_root=cd_root
[ ! -f "$GITIGNORE_TEMPLATE" ] || alias cpgi='cp ${GITIGNORE_TEMPLATE} .'
# Tmux
command -v tmux >/dev/null && alias ta="tmux a"
@@ -23,4 +28,4 @@ alias lsa="ls -lAFhZ"
alias path="printenv | grep ^PATH= | sed 's/^PATH=//' | tr ':' '\n'"
command -v fzf >/dev/null && alias path="printenv | grep ^PATH= | sed 's/^PATH=//' | tr ':' '\n' | fzf"
[ ! -f "$GITIGNORE_TEMPLATE" ] || alias cpgi="cp ${GITIGNORE_TEMPLATE} ."
[ ! -f "$PRETTIER_TEMPLATE" ] || alias cpprc='cp ${PRETTIER_TEMPLATE} .'