Skip to content
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

zpool <TAB> completion only works after running zfs <TAB> #16320

Closed
Impact123 opened this issue Jul 2, 2024 · 1 comment · Fixed by #16376
Closed

zpool <TAB> completion only works after running zfs <TAB> #16320

Impact123 opened this issue Jul 2, 2024 · 1 comment · Fixed by #16376
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@Impact123
Copy link

System information

Type Version/Name
Distribution Name Debian
Distribution Version 12 (Bookworm)
Kernel Version 6.1.0-22-amd64
Architecture x86_64 (amd64)
OpenZFS Version 2.2.4 (zfs-2.2.4-1~bpo12+1)

Describe the problem you're observing

I noticed that the zpool <TAB> completion does not work until after one has already run zfs <TAB>.
This seems to be due to the fact that /usr/share/bash-completion/completions/zpool does not exist but /usr/share/bash-completion/completions/zfs does.
A simple "fix" that worked for me is to symlink /usr/share/bash-completion/completions/zfs to /usr/share/bash-completion/completions/zpool or sourceing the /usr/share/bash-completion/completions/zfs file.

Describe how to reproduce the problem

  1. Open a new shell, type zpool and press TAB
  2. Type zfs and press TAB
  3. Type zpool and press TAB
  4. Note the difference between 1 and 3.

Include any warning/errors/backtraces from the system logs

@Impact123 Impact123 added the Type: Defect Incorrect behavior (e.g. crash, hang) label Jul 2, 2024
@Harry-Chen
Copy link
Contributor

Related downstream bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074597

Harry-Chen added a commit to Harry-Chen/zfs that referenced this issue Jul 22, 2024
Currently user won't have completion of `zpool` command until they
trigger completion of `zfs` first. This patch adds a link to `zfs`,
thus user can use both to initialize the completion.

Fixes: openzfs#16320

Signed-off-by: Shengqi Chen <[email protected]>
Harry-Chen added a commit to Harry-Chen/zfs that referenced this issue Jul 22, 2024
Currently user won't have completion of `zpool` command until they
trigger completion of `zfs` first. This patch adds a link to `zfs`,
thus user can use both to initialize the completion.

Fixes: openzfs#16320

Signed-off-by: Shengqi Chen <[email protected]>
Harry-Chen added a commit to Harry-Chen/zfs that referenced this issue Aug 3, 2024
Currently user won't have completion of `zpool` command until they
trigger completion of `zfs` first. This patch adds a link to `zfs`,
thus user can use both to initialize the completion.

Fixes: openzfs#16320

Signed-off-by: Shengqi Chen <[email protected]>
Harry-Chen added a commit to Harry-Chen/zfs that referenced this issue Aug 3, 2024
Currently user won't have completion of `zpool` command until they
trigger completion of `zfs` first. This patch adds a link to `zfs`,
thus user can use both to initialize the completion.

Fixes: openzfs#16320

Signed-off-by: Shengqi Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants