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

ignore quoted characters when splitting keybindings into actions #3612

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

matthias314
Copy link
Contributor

Currently a keybinding of the form

"F3": "command:run sh -c 'ls | wc -l'"

does not work because micro interprets &, | and , as separators between actions:

// TODO: fix problem when complex bindings have these
// characters (escape them?)
idx := strings.IndexAny(action, "&|,")

This PR fixes this by ignoring escaped and quoted characters when splitting a keybinding into actions.

internal/util/util.go Outdated Show resolved Hide resolved
internal/util/util.go Outdated Show resolved Hide resolved
internal/util/util.go Outdated Show resolved Hide resolved
@matthias314
Copy link
Contributor Author

I believe the latest version addresses all comments (which I've therefore marked as resolved). Let me know if that's not the case.

@dmaluka
Copy link
Collaborator

dmaluka commented Jan 19, 2025

LGTM. Thanks for the fix.

@JoeKar JoeKar merged commit f5debdf into zyedidia:master Jan 20, 2025
6 checks passed
@matthias314 matthias314 deleted the m3/action-quote branch January 20, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants