From 53413650567d9e6dd2fbb3f0699626261d9d7df4 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Thu, 8 Dec 2022 05:02:08 -0500 Subject: [PATCH] [+] gitenv --- scripts/zshrc.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index 4388c54..6709a7f 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -245,6 +245,24 @@ git() { fi } +# Git environment +git-env() { + git_commands=( add bisect branch checkout clone commit diff fetch grep init log merge pull push rebase reset restore show status tag ) + for i in "${git_commands[@]}" + do + alias "$i"="git $i" + done + alias 'grm'='git rm' + alias 'gmv'='git mv' +} +git-unenv() { + git_commands=( add bisect branch checkout clone commit diff fetch grep init log merge pull push rebase reset restore show status tag grm gmv ) + for i in "${git_commands[@]}" + do + unalias "$i" + done +} + # Mac hostname mac-hostname() { name="$@"