https://github.com/knu/zsh-easy-vcs-status
A zle tweak for easy access to VCS status
https://github.com/knu/zsh-easy-vcs-status
Last synced: 4 months ago
JSON representation
A zle tweak for easy access to VCS status
- Host: GitHub
- URL: https://github.com/knu/zsh-easy-vcs-status
- Owner: knu
- License: bsd-2-clause
- Created: 2013-09-30T12:36:34.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2024-09-11T09:28:33.000Z (almost 2 years ago)
- Last Synced: 2025-09-05T23:54:54.795Z (9 months ago)
- Language: Shell
- Size: 54.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
easy-vcs-status for zsh
=======================
Synopsis
--------
* easy-vcs-status - a zle tweak for easy access to VCS status
Description
-----------

This tweak allows user to pop up VCS status using the completion menu
UI with a key combination (default: `Meta-Shift-S`) whenever you are
on the command line.
VCS status is shown in the completion menu which is scrollable back
and forth. If you hit enter, the full output is written to the
standard output. If you hit space, the last shell word on the current
line is pasted into the previous command line as result of the
completion. Otherwise, the menu simply disappears and user can get
back to normal operation on the command line with the previous input.
How to set up
-------------
A variable defined by `vcs_info` is used to figure out what VCS is
used in the current directory, so `vcs_info` must be loaded and
configured in order for this tweak to work.
Given `vcs_info` is set up, put the file `easy-vcs-status` somewhere
in your `$fpath` and add these lines to your `.zshrc`:
autoload -Uz easy-vcs-status
easy-vcs-status
This binds the tab key to `expand-or-complete-or-vcs-status`, a
wrapper of `expand-or-complete` that casts all the magic.
Configuration
-------------
Keys for opening and closing VCS status popups are configurable via
`zstyle` as follows:
# Use Meta-Control-S instead
zstyle ":easy-vcs-status:bindkey" open '^[^S'
You can alternatively manually bind a key to the function
`open-vcs-status`.
Commands for showing VCS statuses are configurable via `zstyle` as
follows:
zstyle ":easy-vcs-status:command" "$vcs" "$command"
For convenient scrolling through a long status output, I strongly
suggest binding keys in the menuselect keymap if you haven't, for
example:
zmodload zsh/complist
bindkey -M menuselect '\e[Z' reverse-menu-complete
bindkey -M menuselect '^V' forward-word
bindkey -M menuselect '^[v' backward-word
bindkey -M menuselect '^[<' beginning-of-history
bindkey -M menuselect '^[>' end-of-history
License
-------
Copyright (c) 2013-2015 Akinori MUSHA
Licensed under the 2-clause BSD license.
See `LICENSE.txt` for details.