Skip to content

Commit e9e665e

Browse files
committed
fix(feh): fix "nounset" error
In the current master, an error message is printed on the TAB completion with the following command line (where the cursor position is placed before the marker "[TAB]"): $ set -u $ feh --font x[TAB] --fontpath bash: words[i + 1]: unbound variable
1 parent 3c2cac0 commit e9e665e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

completions/feh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _comp_cmd_feh()
3030
local font_path
3131
# font_path="$(imlib2-config --prefix 2>/dev/null)/share/imlib2/data/fonts"
3232
# _comp_compgen -C "$font_path" -- -f -X "!*.@([tT][tT][fF])" -S /
33-
for ((i = ${#words[@]} - 1; i > 0; i--)); do
33+
for ((i = ${#words[@]} - 2; i > 0; i--)); do
3434
if [[ ${words[i]} == -@(C|-fontpath) ]]; then
3535
font_path="${words[i + 1]}"
3636
_comp_compgen -aC "$font_path" -- \

0 commit comments

Comments
 (0)