A fellow community member added functionality to use autocomplete on bash / zsh in this PR Autocompletion for bench (zsh and bash) by adityahase · Pull Request #705 · frappe/bench · GitHub <3
However, it doesn’t explain how to use this. I made this post for people who aren’t well versed in the terminal.
It’s pretty straightforward.
- Update your
bench
repository to the latest by runningbench update
or manually pulling the repo - There will be a file called
completion.sh
in that folder now. Make note of it’s path - Open your .zshrc or .bashrc file which will be in your
home
directory and add the line :source <path to completion.sh file>
- Run source ~/.zshrc or ~/.bashrc to load the new config (This is just to load this config in the existing terminal, creating a new one will automatically load the config)
- Enjoy auto-complete!
Autocomple works for all commands and it will also auto-populate sites if you’re in the bench folder.