]> git.lizzy.rs Git - bspwm.git/commitdiff
Fix `bspc rule -r <^n>` completion for zsh
authorEmanuele Torre <torreemanuele6@gmail.com>
Sun, 6 Sep 2020 12:48:02 +0000 (14:48 +0200)
committerBastien Dejean <nihilhill@gmail.com>
Tue, 8 Sep 2020 09:02:35 +0000 (11:02 +0200)
Indexes were offsetted by one and started from 0.
0 is not a valid index.

Fixes #1193.

contrib/zsh_completion

index 417dde59ab76eb3abc47bc196d7ba8c7c527d6c2..169198ad4719a7a0f228a6b1eaf248f70602db01 100644 (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