From d9324c0c43e876d6f53b2d711dba375c119d22c5 Mon Sep 17 00:00:00 2001 From: Jaroslav Rohel Date: Tue, 9 Apr 2024 13:22:57 +0200 Subject: [PATCH] dnf5: Bash completion: Switch to `_init_completion` - `_init_completion` handles redirections (example 2>/dev/null) so completion doesn't have to deal with them. - `__reassemble_comp_words_by_ref` is private --- dnf5/bash-completion/dnf5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnf5/bash-completion/dnf5 b/dnf5/bash-completion/dnf5 index a860d3feb..95419e5ab 100644 --- a/dnf5/bash-completion/dnf5 +++ b/dnf5/bash-completion/dnf5 @@ -2,8 +2,8 @@ _do_dnf5_completion() { - local words=() cword - __reassemble_comp_words_by_ref "><=;|&(:" words cword + local cur prev words cword comp_args + _init_completion -n "><=;|&(:" -- "$@" || return mapfile -t COMPREPLY <<<$("${1}" "--complete=${cword}" "${words[@]}") }