Skip to content

Commit

Permalink
contrib: link zpool to zfs in bash-completion
Browse files Browse the repository at this point in the history
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: #16320

Signed-off-by: Shengqi Chen <[email protected]>
  • Loading branch information
Harry-Chen committed Aug 3, 2024
1 parent aea42e1 commit 24a9b53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions contrib/bash_completion.d/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/zfs
/zpool
12 changes: 8 additions & 4 deletions contrib/bash_completion.d/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
nodist_bashcompletion_DATA = %D%/zfs
SUBSTFILES += $(nodist_bashcompletion_DATA)
nodist_bashcompletion_DATA = %D%/zfs %D%/zpool
COMPLETION_FILES = %D%/zfs
SUBSTFILES += $(COMPLETION_FILES)

SHELLCHECKSCRIPTS += $(nodist_bashcompletion_DATA)
$(call SHELLCHECK_OPTS,$(nodist_bashcompletion_DATA)): SHELLCHECK_SHELL = bash
SHELLCHECKSCRIPTS += $(COMPLETION_FILES)
$(call SHELLCHECK_OPTS,$(COMPLETION_FILES)): SHELLCHECK_SHELL = bash

%D%/zpool: %D%/zfs
$(LN_S) zfs $@

0 comments on commit 24a9b53

Please sign in to comment.