Skip to content

ignore quoted characters when splitting keybindings into actions#3612

Merged
JoeKar merged 1 commit into
micro-editor:masterfrom
matthias314:m3/action-quote
Jan 20, 2025
Merged

ignore quoted characters when splitting keybindings into actions#3612
JoeKar merged 1 commit into
micro-editor:masterfrom
matthias314:m3/action-quote

Conversation

@matthias314

Copy link
Copy Markdown
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:
https://github.com/zyedidia/micro/blob/f49487dc3adf82ec5e63bf1b6c0ffaed268aa747/internal/action/bufpane.go#L103-L105
This PR fixes this by ignoring escaped and quoted characters when splitting a keybinding into actions.

Comment thread internal/util/util.go Outdated
Comment thread internal/util/util.go Outdated
Comment thread internal/util/util.go Outdated
@matthias314

Copy link
Copy Markdown
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

dmaluka commented Jan 19, 2025

Copy link
Copy Markdown
Collaborator

LGTM. Thanks for the fix.

@JoeKar JoeKar merged commit f5debdf into micro-editor:master Jan 20, 2025
@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