diff --git a/usr/share/bash-completion/completions/clean-blockdevice b/usr/share/bash-completion/completions/clean-blockdevice new file mode 100644 index 000000000..46c596fca --- /dev/null +++ b/usr/share/bash-completion/completions/clean-blockdevice @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# created by Tobias Powalowski +_clean-blockdevice() +{ + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + compopt -o bashdefault -o default + COMPREPLY=( $(compgen -W "$(lsblk -pnro NAME,TYPE | rg '(.*) disk$' -r '$1')" -- $cur) ) + return 0 +} +complete -F _clean-blockdevice clean-blockdevice