Hi.
Autocompletion for Stratis commands is not working for me on RH 9.1. Anyone else having this issue? Bash-completion is installed.
where would one obtain the stratis script?
thanks
Wow you are not a bot? Why are you spamming the forum with exam dump links? Facepalm.
stratis is missing from "/usr/share/bash-completion/completions/stratis".
Thanks.
The stratis autocompletion script is part of the stratis RPM package, nothing special needs to be done.
Interestingly enough, it seems only one version of the stratis-cli package provides that file:
[root@rhel91 ~]# dnf provides "/usr/share/bash-completion/completions/stratis"
Updating Subscription Management repositories.
Last metadata expiration check: 0:02:30 ago on Fri Apr 21 02:27:10 2023.
stratis-cli-2.4.3-2.el9.noarch : Command-line tool for interacting with the Stratis daemon
Repo : rhel-9-for-x86_64-appstream-rpms
Matched from:# dnf list --showduplicates stratis-cli
Updating Subscription Management repositories.
Last metadata expiration check: 0:05:38 ago on Fri Apr 21 02:27:10 2023.
Installed Packages
stratis-cli.noarch 3.2.0-1.el9 @RHEL-9-for-x86_64-appstream-rpms
Available Packages
stratis-cli.noarch 2.4.3-2.el9 rhel-9-for-x86_64-appstream-rpms
stratis-cli.noarch 3.2.0-1.el9 rhel-9-for-x86_64-appstream-rpms
Filename : /usr/share/bash-completion/completions/stratis
So if you install latest package stratis-cli-3.2.0-1.el9 will not work (file is not present). If you manually do a "yum install stratis-cli-2.4.3-2.el9" it should provide the bash completion file. This sounds like a bug/regression in the RPM package, as it probably should include the file.
Was facing the same (annoying) issue today. Since nobody mentioned a workaround:
sudo curl https://raw.githubusercontent.com/stratis-storage/stratis-cli/v$(stratis --version)/shell-completion/bash/stratis -o /usr/share/bash-completion/completions/stratis
(sorry, I have no idea how to format code here...)
Cheers,
Hi!,
Remove complete stratis packages from your system. After successful removal, follow these steps:
$ sudo dnf install stratis-cli-2.4.3-2.el9.noarch
Installing this version would give you the /usr/share/bash-completion/completions/stratis (bash auto-completion script file). Now create a directory in $HOME with any name you like and copy the above bash auto-completion script file to this new directory. Then,
$ sudo dnf install stratisd stratis-cli (which would install the latest available stratis packages)
After successful installtion, copy the bash auto-completion script file back to /usr/share/bash-completion/completions/.
Now verify and you would find that stratis bash autocompletion is working.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.