fish: Add git alias helpers for opening & adding unmerged files

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-05-03 21:46:52 +05:30
parent 534eebb89e
commit 7f51f5d2d4

View file

@ -207,8 +207,7 @@ alias gwx='git rm -r'
alias gwX='git rm -rf' alias gwX='git rm -rf'
# Open modified files # Open modified files
# ACMR = Added || Copied || Modified || Renamed # ACMRU = Added || Copied || Modified || Renamed || Unmerged
alias v="nvim"
# Edit all uncommitted files that have changes since the last commit (be they staged or unstaged) # Edit all uncommitted files that have changes since the last commit (be they staged or unstaged)
alias vd="nvim (git diff HEAD --name-only --diff-filter=ACMR)" alias vd="nvim (git diff HEAD --name-only --diff-filter=ACMR)"
# Edit all staged files that have changes since the last commit # Edit all staged files that have changes since the last commit
@ -217,3 +216,7 @@ alias vds="nvim (git diff --staged --name-only --diff-filter=ACMR)"
alias vdc="nvim (git diff HEAD^ --name-only --diff-filter=ACMR)" alias vdc="nvim (git diff HEAD^ --name-only --diff-filter=ACMR)"
# Edit files changed since master # Edit files changed since master
alias vdm="nvim (git diff master --name-only --diff-filter=ACMR)" alias vdm="nvim (git diff master --name-only --diff-filter=ACMR)"
# Edit files unmerged
alias vdu="nvim (git diff --name-only --diff-filter=U | uniq)"
# Add unmerged files
alias vdua="git add (git diff --name-only --diff-filter=U)"