git: move aliases to fish abbreviations
This commit is contained in:
parent
c59678021e
commit
09548ce411
21
fish/conf.d/abbr.fish
Normal file
21
fish/conf.d/abbr.fish
Normal file
@ -0,0 +1,21 @@
|
||||
if status --is-interactive
|
||||
abbr -a -g d 'docker'
|
||||
abbr -a -g vi 'nvim'
|
||||
abbr -a -g vim 'nvim'
|
||||
|
||||
abbr -a -g g 'git'
|
||||
abbr -a -g ga 'git add'
|
||||
abbr -a -g gb 'git branchsort'
|
||||
abbr -a -g gbd 'git branch -D'
|
||||
abbr -a -g gc 'git commit'
|
||||
abbr -a -g gco 'git checkout'
|
||||
abbr -a -g gcp 'git cherry-pick'
|
||||
abbr -a -g gd 'git diff'
|
||||
abbr -a -g gdc 'git diff --cached'
|
||||
abbr -a -g gdh 'git diff --cached HEAD~'
|
||||
abbr -a -g gl 'git log --oneline -10'
|
||||
abbr -a -g gr 'git restore'
|
||||
abbr -a -g gs 'git status'
|
||||
abbr -a -g gst 'git stash'
|
||||
abbr -a -g gsw 'git switch'
|
||||
end
|
@ -47,11 +47,6 @@ set -x LESS_TERMCAP_so (set_color -b blue black)
|
||||
set -x LESS_TERMCAP_ue (set_color normal)
|
||||
set -x LESS_TERMCAP_us (set_color brgreen)
|
||||
|
||||
# Abbreviations
|
||||
abbr -a -g d docker
|
||||
abbr -a -g vi nvim
|
||||
abbr -a -g vim nvim
|
||||
|
||||
# Aliases
|
||||
alias which='type --all --short'
|
||||
function ..; cd ..; end
|
||||
|
22
git/config
22
git/config
@ -7,30 +7,10 @@
|
||||
pager = diff-so-fancy | less --tabs=4 -RFX
|
||||
[alias]
|
||||
aliases = config --get-regexp alias
|
||||
br = branch --sort='-committerdate' --format='%(HEAD) %(color:blue)%(committerdate:short)%(color:reset) - %(if)%(worktreepath)%(then)%(color:reverse yellow)%(refname:short)%(color:reset)%(else)%(color:yellow)%(refname:short)%(color:reset)%(end)'
|
||||
co = checkout
|
||||
df = diff
|
||||
dc = diff --cached
|
||||
dch = diff --cached HEAD~
|
||||
lol = log --oneline --max-count=10 --decorate=no
|
||||
ss = status --short
|
||||
st = status --long
|
||||
sw = switch
|
||||
cp = cherry-pick
|
||||
f = fetch --all --prune
|
||||
pl = pull
|
||||
ps = push
|
||||
pu = push --set-upstream
|
||||
pf = push --force
|
||||
cm = commit -m
|
||||
cv = commit -v
|
||||
ca = commit --amend
|
||||
branchsort = branch --sort='-committerdate' --format='%(HEAD) %(color:blue)%(committerdate:short)%(color:reset) - %(if)%(worktreepath)%(then)%(color:reverse yellow)%(refname:short)%(color:reset)%(else)%(color:yellow)%(refname:short)%(color:reset)%(end)'
|
||||
can = commit --amend --no-edit
|
||||
cand = commit --amend --no-edit --date=now
|
||||
rbi = rebase --interactive
|
||||
re = restore
|
||||
res = restore --staged
|
||||
ress = restore --staged --worktree --source=HEAD
|
||||
[color]
|
||||
ui = auto
|
||||
[color "branch"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user