From 0afc2e4a5db45b569827ca3bbef90f70bc7e74f5 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Wed, 29 Nov 2023 07:18:00 +0900 Subject: [PATCH] fix(povray): process each element against patsub_replacement --- completions/povray | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/completions/povray b/completions/povray index 948b89bb686..8d01fa5a527 100644 --- a/completions/povray +++ b/completions/povray @@ -37,7 +37,10 @@ _comp_cmd_povray() command grep '^[-+]I' <<<"${words[*]}" )) _comp_compgen -Rv COMPREPLY -- -X '' -W '"${COMPREPLY[@]#[-+]I}"' - COMPREPLY=("${COMPREPLY[@]/%.pov/.$oext}") + local i + for i in "${!COMPREPLY[@]}"; do + COMPREPLY[i]=${COMPREPLY[i]/%.pov/".$oext"} + done cur="${povcur#[-+]O}" # to confuse _comp_compgen_filedir pfx="${povcur%"$cur"}" _comp_compgen -a filedir $oext