Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zvm_config:2: command not found: zvm_cursor_style #206

Closed
3 tasks done
woodnathan opened this issue Mar 16, 2023 · 2 comments
Closed
3 tasks done

zvm_config:2: command not found: zvm_cursor_style #206

woodnathan opened this issue Mar 16, 2023 · 2 comments
Assignees
Labels
bug Something isn't working verified This issue was already verified

Comments

@woodnathan
Copy link

General information

Please report the following information as possible as you can:

  • Terminal program: Apple Terminal 2.13 (447)
  • Operating system: CentOS Stream release 9
  • ZSH framework: None, git-clone
  • ZSH version: zsh 5.8 (x86_64-redhat-linux-gnu)
  • ZVM version: 0.8.5

Basic examination

  • I have read through the README page
  • I have the latest version of zsh-vi-mode
  • I have tested with another terminal program

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 jeffreytse self-assigned this Mar 17, 2023
@jeffreytse jeffreytse added bug Something isn't working verified This issue was already verified labels Mar 17, 2023
@jeffreytse
Copy link
Owner

jeffreytse commented Mar 17, 2023

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

jeffreytse added a commit that referenced this issue Mar 17, 2023
When using zvm native commands in `zvm_config`, such as `zvm_cursor_style`,
you will not be able to invoke them, as they haven't be defined at the
moment `zvm_config` is invoked.
@woodnathan
Copy link
Author

I can confirm that this is now fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified This issue was already verified
Projects
None yet
Development

No branches or pull requests

2 participants