-
Notifications
You must be signed in to change notification settings - Fork 169
Makefile/rpm: Add shell completions #1938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,8 +43,15 @@ bin: manpages | |
| manpages: | ||
| cargo run --release --package xtask -- manpages | ||
|
|
||
| .PHONY: completion | ||
| completion: | ||
| mkdir -p target/completion | ||
| for shell in bash elvish fish powershell zsh; do \ | ||
| target/release/bootc completion $$shell > target/completion/bootc.$$shell; \ | ||
| done | ||
|
|
||
| STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage) | ||
| install: | ||
| install: completion | ||
| install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc | ||
| install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/system-reinstall-bootc | ||
| install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/bound-images.d | ||
|
|
@@ -54,6 +61,11 @@ install: | |
| install -d $(DESTDIR)$(prefix)/lib/bootc/install | ||
| install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man5 target/man/*.5; \ | ||
| install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 target/man/*.8; \ | ||
| install -D -m 0644 target/completion/bootc.bash $(DESTDIR)$(prefix)/share/bash-completion/completions/bootc | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is not consistent with this list.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed with: eaf920e. I would rather not package elvish and powershell completions in the rpm due to lack of docs and ecosystem around it. I also never used them. I hope that's okay. |
||
| install -D -m 0644 target/completion/bootc.elvish $(DESTDIR)$(prefix)/share/elvish/lib/bootc.elv | ||
| install -D -m 0644 target/completion/bootc.fish $(DESTDIR)$(prefix)/share/fish/vendor_completions.d/bootc.fish | ||
| install -D -m 0644 target/completion/bootc.powershell $(DESTDIR)$(prefix)/share/powershell/Modules/Bootc/Bootc.psm1 | ||
| install -D -m 0644 target/completion/bootc.zsh $(DESTDIR)$(prefix)/share/zsh/site-functions/_bootc | ||
| install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target | ||
| install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf | ||
| install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list...