jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
2.94k stars 102 forks source link

zvm_config:2: command not found: zvm_cursor_style #206

Closed woodnathan closed 1 year ago

woodnathan commented 1 year ago

General information

Please report the following information as possible as you can:

Basic examination

Problem description

I setup zsh-vi-mode on macOS but kept receiving the following messages when opening a new shell:

zvm_config:2: command not found: zvm_cursor_style
zvm_config:3: command not found: zvm_cursor_style

To rule things out, I setup a CentOS VM, installed zsh and git, and then setup zsh-vi-mode according to the "Manually" instructions. I then followed the instructions from the README under "Also, custom your colorful cursor style as below"

Now every time the shell starts I get told that zvm_cursor_style can't be found.

Full .zshrc:

# The plugin will auto execute this zvm_config function
zvm_config() {
  # Retrieve default cursor styles
  local ncur=$(zvm_cursor_style $ZVM_NORMAL_MODE_CURSOR)
  local icur=$(zvm_cursor_style $ZVM_INSERT_MODE_CURSOR)

  # Append your custom color for your cursor
  ZVM_INSERT_MODE_CURSOR=$icur'\e\e]12;red\a'
  ZVM_NORMAL_MODE_CURSOR=$ncur'\e\e]12;#008800\a'
}

source $HOME/.zsh-vi-mode/zsh-vi-mode.plugin.zsh

Reproduction steps

  1. git clone https://github.com/jeffreytse/zsh-vi-mode.git $HOME/.zsh-vi-mode
  2. Update .zshrc with the contents above
  3. source ~/.zshrc

Expected behavior

No error message.

jeffreytse commented 1 year ago

Hi @woodnathan

Thanks for your issue, and this is a bug after further verification, I will fix it as soon as possible. Also, welcome to star this project for further update in the future. : )

Thanks & Regards

woodnathan commented 1 year ago

I can confirm that this is now fixed. Thanks!