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

Using bindings results in "No such shell function `.edit.subword'" error #17

Closed
Jackenmen opened this issue Apr 7, 2023 · 6 comments
Closed
Labels
bug Something isn't working

Comments

@Jackenmen
Copy link

Describe the bug

When trying to use any binding provided by zsh-edit, I run into this error message:

No such shell function `.edit.subword'

Additionally, it seems that when trying to use zsh-edit on a fresh machine, I'm also seeing (or similar depending on which binding is used):

No such widget `.backward-shell-word'

Steps To Reproduce

I reproduced this on a fresh Ubuntu 20.04 VM with git and zsh packages installed.

  1. Put this in .zshrc
# Created by newuser for 5.8
source ~/zsh-snap/znap.zsh

znap source marlonrichert/zsh-edit
  1. Open zsh.
  2. Use Alt+Left/Right shortcut.
  3. See the issue

Expected behavior

I expected the bindings to move by a shell/subword as it did before.

Observed behavior

Using the key binding resulted in an error:

No such shell function `.edit.subword'

Environment:

  • OS: Ubuntu 20.04 and 22.04
  • Terminal: Gnome Terminal and kitty
  • Zsh version: 5.8 and 5.8.1
  • Repo version: * main 98ae841 Update GitHub tests to `ubuntu-latest`

Additional context

The issue seems to have been introduced by faf5a1e

@Jackenmen Jackenmen added the bug Something isn't working label Apr 7, 2023
@zhouying20
Copy link

setopt EXTENDED_GLOB

before sourcing the plugin may help, but the shell-forward/backword are not working as discribed in README....

@otakutyrant
Copy link

otakutyrant commented Apr 27, 2023

I have just installed this plugin but encountered this issue then.

@Jackenmen
Copy link
Author

@otakutyrant As a workaround I suggest to figure out how to pin to a git commit in your plugin manager and using the last working commit which is fcddcbc5ac24643167d47bb34994e4e62a1dbe9e. That's what I'm doing anyway.

@QuarticCat
Copy link
Contributor

For anyone who only needs the subword widget, I wrote a simplified version and fixed a bug by the way.

https://github.com/QuarticCat/dotfiles/blob/76745aee9b2df1cd0d41fc1ece8caf4c2ceb4c85/zsh/.zshrc#L253-L290

It requires setopt extended_glob.

@otakutyrant
Copy link

@Jackenmen This workaround works! Thank you.

marlonrichert added a commit that referenced this issue May 2, 2023
@marlonrichert
Copy link
Owner

Sorry about that. It's fixed now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants