diff options
| author | 2024-02-01 17:25:32 +0000 | |
|---|---|---|
| committer | 2024-02-01 17:25:32 +0000 | |
| commit | b8e7bfec8ddfda1484db748f06663cd3378ce8cc (patch) | |
| tree | 64f100e6730caa3290290876575b8e54660b94af /fish | |
| parent | 7574b6cde92d36b989e03ec5ea922fadc70682bc (diff) | |
aliases git e docker
Diffstat (limited to 'fish')
| -rw-r--r-- | fish/config.fish | 3 | ||||
| -rw-r--r-- | fish/functions/docker_aliases.fish | 23 | ||||
| -rw-r--r-- | fish/functions/git_aliases.fish | 192 |
3 files changed, 218 insertions, 0 deletions
diff --git a/fish/config.fish b/fish/config.fish index 1b3eb2c..9424121 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -72,6 +72,9 @@ abbr -a gc "git commit" abbr -a gl "git log --oneline" abbr -a man /usr/bin/batman +git_aliases +docker_aliases + set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME set -gx PATH $HOME/.cabal/bin $PATH /home/bombom/.ghcup/bin diff --git a/fish/functions/docker_aliases.fish b/fish/functions/docker_aliases.fish new file mode 100644 index 0000000..14be473 --- /dev/null +++ b/fish/functions/docker_aliases.fish @@ -0,0 +1,23 @@ +# Defined in /tmp/fish.fHKs5I/docker_aliases.fish @ line 1 +function docker_aliases + set -l dccmd "docker compose" + + abbr -a dco "$dccmd" + abbr -a dcb "$dccmd build" + abbr -a dce "$dccmd exec" + abbr -a dcps "$dccmd ps" + abbr -a dcrestart "$dccmd restart" + abbr -a dcrm "$dccmd rm" + abbr -a dcr "$dccmd run" + abbr -a dcstop "$dccmd stop" + abbr -a dcup "$dccmd up" + abbr -a dcupb "$dccmd up --build" + abbr -a dcupd "$dccmd up -d" + abbr -a dcupdb "$dccmd up -d --build" + abbr -a dcdn "$dccmd down" + abbr -a dcl "$dccmd logs" + abbr -a dclf "$dccmd logs -f" + abbr -a dcpull "$dccmd pull" + abbr -a dcstart "$dccmd start" + abbr -a dck "$dccmd kill" +end diff --git a/fish/functions/git_aliases.fish b/fish/functions/git_aliases.fish new file mode 100644 index 0000000..6c205b3 --- /dev/null +++ b/fish/functions/git_aliases.fish @@ -0,0 +1,192 @@ +# Defined in /tmp/fish.2N4eH3/git_aliases.fish @ line 2 +function git_aliases + abbr -a g git + + abbr -a ga 'git add' + abbr -a gaa 'git add --all' + abbr -a gapa 'git add --patch' + abbr -a gau 'git add --update' + abbr -a gav 'git add --verbose' + abbr -a gap 'git apply' + abbr -a gapt 'git apply --3way' + + abbr -a gb 'git branch' + abbr -a gba 'git branch --all' + abbr -a gbd 'git branch --delete' + abbr -a gbda 'git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null' + abbr -a gbD 'git branch --delete --force' + abbr -a gbg 'git branch -vv | grep ": gone\]"' + abbr -a gbgd 'local res $(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -d' + abbr -a gbgD 'local res $(gbg | awk '"'"'{print $1}'"'"') && [[ $res ]] && echo $res | xargs git branch -D' + abbr -a gbl 'git blame -b -w' + abbr -a gbnm 'git branch --no-merged' + abbr -a gbr 'git branch --remote' + abbr -a gbs 'git bisect' + abbr -a gbsb 'git bisect bad' + abbr -a gbsg 'git bisect good' + abbr -a gbsr 'git bisect reset' + abbr -a gbss 'git bisect start' + + abbr -a gc 'git commit --verbose' + abbr -a gc! 'git commit --verbose --amend' + abbr -a gcn! 'git commit --verbose --no-edit --amend' + abbr -a gca 'git commit --verbose --all' + abbr -a gca! 'git commit --verbose --all --amend' + abbr -a gcan! 'git commit --verbose --all --no-edit --amend' + abbr -a gcans! 'git commit --verbose --all --signoff --no-edit --amend' + abbr -a gcam 'git commit --all --message' + abbr -a gcsm 'git commit --signoff --message' + abbr -a gcas 'git commit --all --signoff' + abbr -a gcasm 'git commit --all --signoff --message' + abbr -a gcb 'git checkout -b' + abbr -a gcf 'git config --list' + + abbr -a gcl 'git clone --recurse-submodules' + abbr -a gclean 'git clean --interactive -d' + abbr -a gpristine 'git reset --hard && git clean --force -dfx' + abbr -a gcm 'git checkout $git_main_branch' + abbr -a gcd 'git checkout $(git_develop_branch)' + abbr -a gcmsg 'git commit --message' + abbr -a gco 'git checkout' + abbr -a gcor 'git checkout --recurse-submodules' + abbr -a gcount 'git shortlog --summary --numbered' + abbr -a gcp 'git cherry-pick' + abbr -a gcpa 'git cherry-pick --abort' + abbr -a gcpc 'git cherry-pick --continue' + abbr -a gcs 'git commit --gpg-sign' + abbr -a gcss 'git commit --gpg-sign --signoff' + abbr -a gcssm 'git commit --gpg-sign --signoff --message' + + abbr -a gd 'git diff' + abbr -a gdca 'git diff --cached' + abbr -a gdcw 'git diff --cached --word-diff' + abbr -a gdct 'git describe --tags $(git rev-list --tags --max-count 1)' + abbr -a gds 'git diff --staged' + abbr -a gdt 'git diff-tree --no-commit-id --name-only -r' + abbr -a gdup 'git diff @{upstream}' + abbr -a gdw 'git diff --word-diff' + + abbr -a gf 'git fetch' + abbr -a gfo 'git fetch origin' + + abbr -a gfg 'git ls-files | grep' + + abbr -a gg 'git gui citool' + abbr -a gga 'git gui citool --amend' + + abbr -a gl 'git pull' + abbr -a glg 'git log --stat' + abbr -a glgp 'git log --stat --patch' + abbr -a glgg 'git log --graph' + abbr -a glgga 'git log --graph --decorate --all' + abbr -a glgm 'git log --graph --max-count 10' + abbr -a glo 'git log --oneline --decorate' + abbr -a glol "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'" + abbr -a glols "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --stat" + abbr -a glod "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset'" + abbr -a glods "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=short" + abbr -a glola "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --all" + abbr -a glog 'git log --oneline --decorate --graph' + abbr -a gloga 'git log --oneline --decorate --graph --all' + abbr -a glp _git_log_prettily + + abbr -a gm 'git merge' + abbr -a gmom 'git merge origin/$(git_main_branch)' + abbr -a gmtl 'git mergetool --no-prompt' + abbr -a gmtlvim 'git mergetool --no-prompt --tool vimdiff' + abbr -a gmum 'git merge upstream/$(git_main_branch)' + abbr -a gma 'git merge --abort' + + abbr -a gp 'git push' + abbr -a gpd 'git push --dry-run' + abbr -a gpf 'git push --force-with-lease' + abbr -a gpf! 'git push --force' + abbr -a gpoat 'git push origin --all && git push origin --tags' + abbr -a gpod 'git push origin --delete' + abbr -a gpr 'git pull --rebase' + abbr -a gpu 'git push upstream' + abbr -a gpv 'git push --verbose' + + abbr -a gr 'git remote' + abbr -a gra 'git remote add' + abbr -a grb 'git rebase' + abbr -a grba 'git rebase --abort' + abbr -a grbc 'git rebase --continue' + abbr -a grbd 'git rebase $(git_develop_branch)' + abbr -a grbi 'git rebase --interactive' + abbr -a grbm 'git rebase $(git_main_branch)' + abbr -a grbom 'git rebase origin/$(git_main_branch)' + abbr -a grbo 'git rebase --onto' + abbr -a grbs 'git rebase --skip' + abbr -a grev 'git revert' + abbr -a grh 'git reset' + abbr -a grhh 'git reset --hard' + abbr -a groh 'git reset origin/$(git_current_branch) --hard' + abbr -a grm 'git rm' + abbr -a grmc 'git rm --cached' + abbr -a grmv 'git remote rename' + abbr -a grrm 'git remote remove' + abbr -a grs 'git restore' + abbr -a grset 'git remote set-url' + abbr -a grss 'git restore --source' + abbr -a grst 'git restore --staged' + abbr -a grt 'cd "$(git rev-parse --show-toplevel || echo .)"' + abbr -a gru 'git reset --' + abbr -a grup 'git remote update' + abbr -a grv 'git remote --verbose' + + abbr -a gsb 'git status --short --branch' + abbr -a gsd 'git svn dcommit' + abbr -a gsh 'git show' + abbr -a gsi 'git submodule init' + abbr -a gsps 'git show --pretty short --show-signature' + abbr -a gsr 'git svn rebase' + abbr -a gss 'git status --short' + abbr -a gst 'git status' + + # use the default stash push on git 2.13 and newer + abbr -a gsta 'git stash push' + abbr -a gstaa 'git stash apply' + abbr -a gstc 'git stash clear' + abbr -a gstd 'git stash drop' + abbr -a gstl 'git stash list' + abbr -a gstp 'git stash pop' + abbr -a gsts 'git stash show --text' + abbr -a gstu 'gsta --include-untracked' + abbr -a gstall 'git stash --all' + abbr -a gsu 'git submodule update' + abbr -a gsw 'git switch' + abbr -a gswc 'git switch --create' + abbr -a gswm 'git switch $(git_main_branch)' + abbr -a gswd 'git switch $(git_develop_branch)' + + abbr -a gts 'git tag --sign' + abbr -a gtv 'git tag | sort -V' + abbr -a gtl 'gtl(){ git tag --sort -v:refname -n --list "${1}*" }; noglob gtl' + + abbr -a gunignore 'git update-index --no-assume-unchanged' + abbr -a gunwip 'git log --max-count 1 | grep -q -c "\--wip--" && git reset HEAD~1' + abbr -a gup 'git pull --rebase' + abbr -a gupv 'git pull --rebase --verbose' + abbr -a gupa 'git pull --rebase --autostash' + abbr -a gupav 'git pull --rebase --autostash --verbose' + abbr -a gupom 'git pull --rebase origin $(git_main_branch)' + abbr -a gupomi 'git pull --rebase interactive origin $(git_main_branch)' + abbr -a glum 'git pull upstream $(git_main_branch)' + abbr -a gluc 'git pull upstream $(git_current_branch)' + + abbr -a gwch 'git whatchanged -p --abbrev-commit --pretty medium' + abbr -a gwip 'git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]"' + + abbr -a gwt 'git worktree' + abbr -a gwta 'git worktree add' + abbr -a gwtls 'git worktree list' + abbr -a gwtmv 'git worktree move' + abbr -a gwtrm 'git worktree remove' + + abbr -a gam 'git am' + abbr -a gamc 'git am --continue' + abbr -a gams 'git am --skip' + abbr -a gama 'git am --abort' + abbr -a gamscp 'git am --show-current-patch' +end |
