>_ZSH-GIT-ACP
Ctrl-S — stage all, commit with the current buffer as message, push. Two ZLE widgets that take BUFFER as the commit message and run git pull, git add, git commit, git push. If there is no remote the pull and push steps are omitted. Plus 159 git aliases.
Install
# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-git-acp
# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-git-acp \
"$HOME/.oh-my-zsh/custom/plugins/zsh-git-acp"
# then: plugins+=(zsh-git-acp)
# Manual
git clone https://github.com/MenkeTechnologies/zsh-git-acp
source zsh-git-acp/zsh-git-acp.plugin.zsh
Key bindings
^S (viins + vicmd) | zsh-gacp-NoCheck — pull / add / commit / push with no confirmation. Plugin runs setopt noflowcontrol so ^S reaches ZLE. |
^F^S (viins + vicmd) | zsh-gacp-CheckDiff — same flow but shows side-by-side diff piped into less and prompts for confirmation. |
Both widgets check the current directory against $ZSH_GACP_BLACKLISTED_DIRECTORIES and abort with an error if matched: export ZSH_GACP_BLACKLISTED_DIRECTORIES=(dir1 dir2).
Aliases (sample)
gbuom | git branch -u origin/$(zsh-gacp-mainBranch) |
gcm / gcd | checkout main / dev branch |
gdom / gdod | git diff -w against origin main / dev |
glgf | git log --stat --format=fuller |
gsa | git rev-list --all | xargs git grep -C 5 |
The full 159-alias list lives in the README "159 git aliases" section.
Sibling plugins
Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella:
- zsh-better-npm-completion — cache-aware
npm installcompletion - zsh-cargo-completion — live
cargo add/cargo installcompletion - zsh-cpan-completion — live MetaCPAN
cpan/cpanmcompletion - zsh-dotnet-completion — dotnet CLI completion
- zsh-expand — spacebar expansion (11,683 tests)
- zsh-gem-completion — ruby
gem installremote completion - zsh-git-repo-cache — index every git repo on disk
- zsh-learn — MySQL-backed learning collection / quiz
- zsh-more-completions — 33,175-file mega completion corpus
- zsh-nginx — nginx commands + service-wrapper aliases
- zsh-pip-description-completion — pip remote completion with descriptions
- zsh-sed-sub — in-place sed substitution on the command line
- zsh-sudo — ESC ESC to prepend sudo
- zsh-xcode-completions — xcodebuild / xcrun / swift completion