.cfg/.aliases

51 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

#!/bin/bash
PINK='\033[0;35m'
NC='\033[0m' # No Color
function print_color () {
printf "${PINK}$@\n${NC}"
}
# git
alias gs="print_color \"git status\"; git status "
alias ga="print_color \"git add --all\"; git add --all "
alias gc="print_color \"git commit -a\"; git commit -a "
alias gcm="print_color \"git commit -am\"; git commit -am "
alias gacm="ga; gcm "
alias gpl="print_color \"git pull\"; git pull"
alias gf="print_color \"git fetch\"; git fetch"
alias gp="print_color \"git push\"; git push"
function gacmp () {
ga
print_color "git commit"
git commit -am "$@"
gp
gs
}
#ls
alias l="exa -la"
## Manage dotfiles
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
# config
alias cgs="print_color \"config status\"; config status "
alias cga="print_color \"config add -u\"; config add -u "
alias cgacm="print_color \"config commit -am\"; config commit -am "
alias cgpl="print_color \"config pull\"; config pull"
alias cgf="print_color \"config fetch\"; config fetch"
alias cgp="print_color \"config push\"; config push"
function cgacmp () {
cgacm "$@"
cgp
cgs
}