by binds yourself for repeating commandline buffer
November 21, 2025 ยท View on GitHub
For example, by git binds git commands so that you no longer retype git every time.
$ by git
$ git
# ^-- appears automatically to make subsequent git workflows
$ git status
$ git add README.md
$ git commit -m "add README.md"
Unbind by by without arguments:
$ by
$
Note that the bounded commandline buffer is still a normal commandline buffer. You still have chance to modify it before execution.
See Why by? for more use cases.
Installation
Supported shells: zsh, fish
zsh
with sheldon
$ sheldon add by --git https://github.com/atusy/by-binds-yourself
manual
source by.zsh
fish
with fisher
fisher install atusy/by-binds-yourself
manual
source by.fish
Why by?
This project is inspired by mchav/with, the program prefixing for continuous workflow using a single tool.
To bring more flexibility, by is designed to use native commandline buffer.
To bind without breaking native shell features
completions, history, and so on
# completion
$ by git
$ git ch<TAB>
To bind environment variables without exporting
$ BAR="$(cat file)"
$ by 'FOO="$BAR"'
To bind buffer in a modifiable way
$ by gcc -o output input.c
$ gcc -o output input.c
$ gcc -o output input.c
$ gcc -o YET_ANOTHER_OUTPUT input.c
# The bind is just a normal buffer that can be modified