zsh:keys:cmd-on-enter: Switch until conditions
The requirement does not need to be executed if the idx wrapped around already.
This commit is contained in:
@@ -192,8 +192,8 @@ function cmd-on-enter {
|
||||
local idx=$cmd_on_enter_idx
|
||||
idx=$((idx < $#CMDS_ON_ENTER ? idx + 1 : 1))
|
||||
until
|
||||
$REQUIREMENTS_CMDS_ON_ENTER[$idx] &>/dev/null \
|
||||
|| [[ $idx = $cmd_on_enter_idx ]]
|
||||
[[ $idx = $cmd_on_enter_idx ]] \
|
||||
|| $REQUIREMENTS_CMDS_ON_ENTER[$idx] &>/dev/null
|
||||
do
|
||||
idx=$((idx < $#CMDS_ON_ENTER ? idx + 1 : 1))
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user