fish: switch to global abbreviations
This commit is contained in:
parent
a148094bdd
commit
d102edbda3
27
fish/conf.d/abbr.fish
Normal file
27
fish/conf.d/abbr.fish
Normal file
@ -0,0 +1,27 @@
|
||||
abbr -a d 'docker'
|
||||
abbr -a e 'edit'
|
||||
abbr -a h 'history'
|
||||
abbr -a k 'kubectl'
|
||||
abbr -a l 'less'
|
||||
abbr -a m 'minikube'
|
||||
abbr -a n 'nerdctl'
|
||||
abbr -a p 'podman'
|
||||
|
||||
# Git abbreviations
|
||||
abbr -a g 'git'
|
||||
abbr -a ga 'git add'
|
||||
abbr -a gb 'git branchsort'
|
||||
abbr -a gbd 'git branch -D'
|
||||
abbr -a gc 'git commit'
|
||||
abbr -a gco 'git checkout'
|
||||
abbr -a gcp 'git cherry-pick'
|
||||
abbr -a gd 'git diff'
|
||||
abbr -a gdc 'git diff --cached'
|
||||
abbr -a gdh 'git diff --cached HEAD~'
|
||||
abbr -a gf 'git fetch --prune'
|
||||
abbr -a gl 'git logsearch -10'
|
||||
abbr -a glo 'git log --oneline -10'
|
||||
abbr -a gr 'git restore'
|
||||
abbr -a gs 'git status'
|
||||
abbr -a gst 'git stash'
|
||||
abbr -a gsw 'git switch'
|
@ -15,7 +15,7 @@ function __fzf_files
|
||||
fzf \
|
||||
--ansi \
|
||||
--preview='bat --style=numbers --color=always {}' \
|
||||
--preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \
|
||||
--preview-window='right,70%,wrap,hidden,<200(bottom,50%,hidden)' \
|
||||
--bind='?:toggle-preview' \
|
||||
--expect='ctrl-e' \
|
||||
--header='ctrl-e to edit, ? to preview'
|
||||
@ -44,7 +44,7 @@ function __fzf_git_log
|
||||
--ansi \
|
||||
--tiebreak=index \
|
||||
--preview='git show {2} | delta' \
|
||||
--preview-window='right,70%,wrap,hidden,<200(bottom,50%)' \
|
||||
--preview-window='right,70%,wrap,hidden,<200(bottom,50%,hidden)' \
|
||||
--bind='?:toggle-preview' \
|
||||
--header='? to preview'
|
||||
)
|
||||
|
@ -57,35 +57,6 @@ end
|
||||
if not set -q __universals_initialized
|
||||
set -U __universals_initialized
|
||||
|
||||
# Abbreviations
|
||||
abbr -a -U d 'docker'
|
||||
abbr -a -U e 'edit'
|
||||
abbr -a -U h 'history'
|
||||
abbr -a -U k 'kubectl'
|
||||
abbr -a -U l 'less'
|
||||
abbr -a -U m 'minikube'
|
||||
abbr -a -U n 'nerdctl'
|
||||
abbr -a -U p 'podman'
|
||||
|
||||
# Git abbreviations
|
||||
abbr -a -U g 'git'
|
||||
abbr -a -U ga 'git add'
|
||||
abbr -a -U gb 'git branchsort'
|
||||
abbr -a -U gbd 'git branch -D'
|
||||
abbr -a -U gc 'git commit'
|
||||
abbr -a -U gco 'git checkout'
|
||||
abbr -a -U gcp 'git cherry-pick'
|
||||
abbr -a -U gd 'git diff'
|
||||
abbr -a -U gdc 'git diff --cached'
|
||||
abbr -a -U gdh 'git diff --cached HEAD~'
|
||||
abbr -a -U gf 'git fetch --prune'
|
||||
abbr -a -U gl 'git logsearch -10'
|
||||
abbr -a -U glo 'git log --oneline -10'
|
||||
abbr -a -U gr 'git restore'
|
||||
abbr -a -U gs 'git status'
|
||||
abbr -a -U gst 'git stash'
|
||||
abbr -a -U gsw 'git switch'
|
||||
|
||||
# Colors
|
||||
set -U fish_color_autosuggestion a5a5a9
|
||||
set -U fish_color_cancel -r
|
||||
|
@ -1,3 +1,3 @@
|
||||
function diff
|
||||
command diff -u $argv[1] $argv[2] | delta
|
||||
command diff --unified $argv | delta
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user