Skip to content

[bug]: conflict with select-word-style bash #88

@foriequal0

Description

@foriequal0

Describe the bug

autoload -Uz select-word-style && select-word-style bash

This setting makes word-unit shortcuts such as Alt-f (move forward one word) act like this

|some-command --some-flag
some|-command --some-flag
some-command| --some-flag
some-command --some|-flag
some-command --some-flag|

With following initialization order, both work great.

autoload -Uz select-word-style && select-word-style bash
zinit light zdharma-continuum/fast-syntax-highlighting

But with following order, select-word-style doesn't work anymore.

zinit light zdharma-continuum/fast-syntax-highlighting
autoload -Uz select-word-style && select-word-style bash

(Consecutive Alt-f)

|some-command --some-flag
some-command |--some-flag
some-command --some-flag|

Steps to reproduce

  1. Include the following two lines of configuration in this order in .zshrc
zinit light zdharma-continuum/fast-syntax-highlighting

autoload -Uz select-word-style && select-word-style bash
  1. Restart zsh
  2. Write some command (e.g. some-command --some-flag)
  3. Move the cursor to the start of the line
  4. Press Alt-f

Expected behavior

The cursor should move like this

|some-command --some-flag
some|-command --some-flag
some-command| --some-flag
some-command --some|-flag
some-command --some-flag|

Screenshots and recordings

No response

Operating System & Version

linux-gnu | ubuntu | x86_64 | x86_64 | x86_64 unknown

Zsh version

zsh 5.9 (x86_64-ubuntu-linux-gnu)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions