From 2571bddf67e3a9d4309ecc39bed5c6432033c894 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Sun, 6 Sep 2020 14:48:02 +0200 Subject: [PATCH] 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. --- contrib/zsh_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/zsh_completion b/contrib/zsh_completion index 417dde5..169198a 100644 --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -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 -- 2.44.0