cancel
Showing results for 
Search instead for 
Did you mean: 
Armanator
Flight Engineer
Flight Engineer
  • 2,770 Views

Stratis autocompletion?

Hi.

Autocompletion for Stratis commands is not working for me on RH 9.1. Anyone else having this issue? Bash-completion is installed.

Labels (3)
5 Replies
Coolcat22
Cadet
Cadet
  • 2,628 Views

where would one obtain the stratis script?

thanks

0 Kudos
Armanator
Flight Engineer
Flight Engineer
  • 2,762 Views

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.

Fran_Garcia
Starfighter Starfighter
Starfighter
  • 2,605 Views

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.

helge000
Cadet
Cadet
  • 1,278 Views

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,

0 Kudos
Bhupendra-Singh
Mission Specialist
Mission Specialist
  • 464 Views

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.

Join the discussion
You must log in to join this conversation.