Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,27 @@ In case the setup fails, the log file is saved under `$HOME/easy-install.log`. Y
$ bench --help
```

## Shell Completion

Bench supports tab completion for bash and zsh.

Run interactively to pick a shell and install location:

```sh
bench completions
```

Or pass flags to skip the prompts:

```sh
bench completions --zsh
bench completions --bash
```

> **Note:** Run this from your frappe-bench directory. The command detects the bench root from the current working directory to include your installed apps' commands in the completion script.

This writes a completion script to `~/.config/bench/` and appends a `source` line to your shell rc file. Re-run it after installing new apps or upgrading bench, since the script is generated from the current command tree.


For more in-depth information on commands and their usage, follow [Commands and Usage](https://github.com/frappe/bench/blob/develop/docs/commands_and_usage.md). As for a consolidated list of bench commands, check out [Bench Usage](https://github.com/frappe/bench/blob/develop/docs/bench_usage.md).

Expand Down
4 changes: 4 additions & 0 deletions bench/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,7 @@ def bench_command(bench_path="."):
from bench.commands.install import install

bench_command.add_command(install)

from bench.commands.completions import completions

bench_command.add_command(completions)
Loading
Loading