diff options
| author | plustik <70038054+plustik@users.noreply.github.com> | 2023-11-19 16:20:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-19 10:20:52 -0500 |
| commit | 49a99180fed618b62ba773e3aebd8968b044262d (patch) | |
| tree | 09482a18f1cc3e8c3b633f4777f086bc9bbf68cd /manual | |
| parent | a5b0ec07cbbca9186a0c86b069d99633c21af128 (diff) | |
feat: generate completion subcommand (#1561)
* generate-completion subcommand
* add Makefile target and replace completion scripts in repo with generated output
* Add completion to manual
Diffstat (limited to 'manual')
| -rw-r--r-- | manual/src/SUMMARY.md | 1 | ||||
| -rw-r--r-- | manual/src/tips-and-tricks/shell-completion.md | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/manual/src/SUMMARY.md b/manual/src/SUMMARY.md index 21bd836..26e5edf 100644 --- a/manual/src/SUMMARY.md +++ b/manual/src/SUMMARY.md @@ -29,6 +29,7 @@ - [Using Delta with Magit](./tips-and-tricks/using-delta-with-magit.md) - [Using Delta with tmux](./tips-and-tricks/using-delta-with-tmux.md) - [Using Delta with VSCode](./tips-and-tricks/using-delta-with-vscode.md) + - [Generating shell completion files](./tips-and-tricks/shell-completion.md) - [Comparisons with other tools](./comparisons-with-other-tools.md) - [Build delta from source](./build-delta-from-source.md) - [Related projects](./related-projects.md) diff --git a/manual/src/tips-and-tricks/shell-completion.md b/manual/src/tips-and-tricks/shell-completion.md new file mode 100644 index 0000000..8f5379c --- /dev/null +++ b/manual/src/tips-and-tricks/shell-completion.md @@ -0,0 +1,12 @@ +# Generating completion files for various shells + +Delta can generate completion files for various shells. +Use the `--generate-completion` subcommand to print the completion script to stdout: + +```sh +delta --generate-completion <SHELL> +``` +<SHELL> should be replaced with the lowercase name of the shell for which the script is to be generated. +Currently bash, elvish, fish, powershell and zsh are supported. + +The completion files in `etc/completion` were also generated with this function and may not be up-to-date. |
