Как сделать поведение zsh вперед-таким же, как в bash / emacs

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

foo bar --non-needed-param --needed-param^

Error: User Rate Limit Exceeded

foo bar --non-needed-param --needed-^param

Error: User Rate Limit Exceeded

foo bar --non-needed-param --^needed-param

Error: User Rate Limit Exceeded

foo bar --non-needed-^param --needed-param

Error: User Rate Limit Exceeded

foo bar --non-^needed-param --needed-param

Error: User Rate Limit Exceeded

foo bar --^non-needed-param --needed-param

Error: User Rate Limit Exceeded

foo ^bar --non-needed-param --needed-param

Error: User Rate Limit Exceeded

foo bar^ --non-needed-param --needed-param

Error: User Rate Limit Exceeded

foo bar^-needed-param --needed-param

Error: User Rate Limit Exceeded

foo bar^-param --needed-param

Error: User Rate Limit Exceeded

foo bar^ --needed-param

Error: User Rate Limit Exceeded

Ответы на вопрос(1)

Решение Вопроса

Error: User Rate Limit Exceeded.zshrcError: User Rate Limit Exceeded

# Bash-like navigation
autoload -U select-word-style
select-word-style bash

Error: User Rate Limit Exceededforward-word-matchError: User Rate Limit Exceeded$ZDOTDIR/functions/forward-word-matchError: User Rate Limit Exceeded$ZDOTDIR/functionsError: User Rate Limit Exceeded$fpathError: User Rate Limit Exceeded$fpathError: User Rate Limit Exceeded

emulate -L zsh
setopt extendedglob

autoload match-words-by-style

local curcontext=":zle:$WIDGET" word
local -a matched_words
integer count=${NUMERIC:-1}

if (( count < 0 )); then
    (( NUMERIC = -count ))
    zle ${WIDGET/forward/backward}
    return
fi

while (( count-- )); do

    match-words-by-style

    # For some reason forward-word doesn't work like the other word
    # commands; it skips whitespace only after any matched word
    # characters.

    if [[ -n $matched_words[4] ]]; then
        # just skip the whitespace and the following word
  word=$matched_words[4]$matched_words[5]
    else
        # skip the word but not the trailing whitespace
  word=$matched_words[5]
    fi

    if [[ -n $word ]]; then
  (( CURSOR += ${#word} ))
    else
  return 1
    fi
done

return 0

Ваш ответ на вопрос