Skip to content

Commit 8f85887

Browse files
akinomyogascop
authored andcommitted
fix(povray): work around bash-4.3 nounset
1 parent 744602a commit 8f85887

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

completions-core/povray.bash

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ _comp_cmd_povray()
3131
*) oext=$defoext ;;
3232
esac
3333
# complete filename corresponding to previously specified +I
34-
_comp_compgen -Rv COMPREPLY -- -X '![-+]I*' -W '"${words[@]}"'
35-
_comp_compgen -Rv COMPREPLY -- -X '' -W '"${COMPREPLY[@]#[-+]I}"'
36-
local i
37-
for i in "${!COMPREPLY[@]}"; do
38-
COMPREPLY[i]=${COMPREPLY[i]/%.pov/".$oext"}
39-
done
34+
if _comp_compgen -Rv COMPREPLY -- -X '![-+]I*' -W '"${words[@]}"' &&
35+
_comp_compgen -Rv COMPREPLY -- -X '' -W '"${COMPREPLY[@]#[-+]I}"'; then
36+
local i
37+
for i in "${!COMPREPLY[@]}"; do
38+
COMPREPLY[i]=${COMPREPLY[i]/%.pov/".$oext"}
39+
done
40+
fi
4041
cur="${povcur#[-+]O}" # to confuse _comp_compgen_filedir
4142
pfx="${povcur%"$cur"}"
4243
_comp_compgen -a filedir "$oext"

0 commit comments

Comments
 (0)