Fix bspc rule -r <^n> completion for zsh

Indexes were offsetted by one and started from 0.
0 is not a valid index.

Fixes #1193.
This commit is contained in:
Emanuele Torre 2020-09-06 14:48:02 +02:00 committed by Bastien Dejean
parent 8e6f769d6f
commit 2571bddf67

View file

@ -295,7 +295,7 @@ _bspc() {
compset -P '*:'
bspc rule -l 2> /dev/null |
while IFS=" " read target settings ;do
by_index+="^$((index++)):${target} ${settings}"
by_index+="^$((++index)):${target} ${settings}"
if [ -n "$IPREFIX" ] ;then
completions+="${target#*:}"
else