From 7427e2e2ce5fabc2b1c737e47e0db1ee2db4d66e Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Mon, 13 Sep 2021 20:59:47 -0400 Subject: [PATCH] Update aliases --- aliases | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/aliases b/aliases index 7bdfb33..85ec98d 100644 --- a/aliases +++ b/aliases @@ -567,7 +567,7 @@ dl_twitch_vid() { # 1 arg = use GPU compress-video 1 "$filename" "$temp_name" extension="${filename##*.}" - mv "$filename" "orig_$filename.$extension" + mv "$filename" "orig_$filename" mv $temp_name.$extension "$filename" printf "${BOLD}Make sure to delete the original video file${NORMAL}\n" fi @@ -627,7 +627,7 @@ dl_vimeo_vid() { # 1 arg = use GPU compress-video 1 "$filename" "$temp_name" extension="${filename##*.}" - mv "$filename" "orig_$filename.$extension" + mv "$filename" "orig_$filename" mv $temp_name.$extension "$filename" printf "${BOLD}Make sure to delete the original video file${NORMAL}\n" fi @@ -813,11 +813,21 @@ git_commit() { eval "$cmd" } +# Performs a commit with the nocheckin prehook disabled. +git_commit_nocheckin() { + cmd="git commit -m \"$*\"" + eval "DISABLE_NOCHECKIN=1 $cmd" +} + git_commit_signed() { cmd="git commit -S -m \"$*\"" eval "$cmd" } +git_fix_nocheckin() { + eval "DISABLE_NOCHECKIN=1 git commit --amend -C HEAD" +} + git_branch_name() { val=`git branch 2>/dev/null | grep '^*' | colrm 1 2` echo "$val" @@ -855,10 +865,10 @@ alias gblm='git blame -wMC' alias gbm='git branch -m' alias gbr='git branch -rv' alias gc='git commit' -alias gcs='git commit -S' # signed alias gcl='git clone' alias gcm='git_commit' alias gcms='git_commit_signed' # signed +alias gcmno='git_commit_nocheckin' alias gco='git checkout' alias gco-='git checkout -' alias gcob='git checkout -b' @@ -875,9 +885,9 @@ alias gds='git diff --stat=160,120' alias gf='git fetch' alias gfa='git fetch --all' alias gfd='git fetch --prune' # Removes remote branches that don't have a counterpart branch on the remote. -alias gfix="git commit --amend -C HEAD" -alias gfixx="git commit --amend -C HEAD ; gp -f" -alias gfixs="git commit -S -a --amend -C HEAD" # signed +alias gfix='git commit --amend -C HEAD' +alias gfixs='git commit -S -a --amend -C HEAD' # signed +alias gfixno='git_fix_nocheckin' alias gfo='git fetch origin' alias gfu='git fetch up' alias gfm='git fetch origin master'