From 3202f348b0c8a597bdd4a2f2307db690c9ffaa93 Mon Sep 17 00:00:00 2001 From: Pratyush Desai Date: Wed, 15 Dec 2021 19:14:29 +0530 Subject: [PATCH] aliases Signed-off-by: Pratyush Desai --- .aliases | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .aliases diff --git a/.aliases b/.aliases new file mode 100644 index 0000000..5dbaa83 --- /dev/null +++ b/.aliases @@ -0,0 +1,50 @@ +#!/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 +}