Skip to content

Commit

Permalink
feat: generate completion subcommand (#1561)
Browse files Browse the repository at this point in the history
* generate-completion subcommand
* add Makefile target and replace completion scripts in repo with generated output
* Add completion to manual
  • Loading branch information
plustik committed Nov 19, 2023
1 parent a5b0ec0 commit 49a9918
Show file tree
Hide file tree
Showing 12 changed files with 683 additions and 172 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -43,6 +43,7 @@ unicode-segmentation = "1.10.1"
unicode-width = "0.1.10"
vte = "0.11.0"
xdg = "2.4.1"
clap_complete = "4.4.4"

[dependencies.git2]
version = "0.17.2"
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -17,6 +17,9 @@ end-to-end-test: build
./tests/test_deprecated_options > /dev/null
./tests/test_navigate_less_history_file

shell-completion:
for shell in bash fish zsh; do ./target/release/delta --generate-completion $$shell > etc/completion/completion.$$shell; done

release:
@make -f release.Makefile release

Expand Down Expand Up @@ -44,4 +47,4 @@ flamegraph: build
chronologer:
chronologer etc/performance/chronologer.yaml

.PHONY: build format lint test unit-test end-to-end-test release version hash benchmark flamegraph chronologer
.PHONY: build format lint test unit-test end-to-end-test release shell-completion version hash benchmark flamegraph chronologer

0 comments on commit 49a9918

Please sign in to comment.