Skip to content

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Sep 29, 2025

This change allows using $EDITOR, ui.editor and the like with spaces within the paths.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added/updated tests to cover my changes

@Veykril Veykril requested a review from a team as a code owner September 29, 2025 10:24
@Veykril Veykril force-pushed the veykril/push-woxmzpvkrxqp branch from 63f6445 to 7f9003b Compare September 29, 2025 10:37
Copy link
Contributor

@yuja yuja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

// Handle things like `EDITOR=emacs -nw` (TODO: parse shell escapes)
let mut args = s.split(' ').map(|s| s.to_owned());
(args.next().unwrap().into(), args.collect())
let mut parts = shlex::Shlex::new(s);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to check had_error and fall back to original string (or space-separated args)? The command execution would be more likely to fail, and the user can notice the problem.
https://docs.rs/shlex/1.3.0/shlex/bytes/struct.Shlex.html#structfield.had_error

@Veykril Veykril force-pushed the veykril/push-woxmzpvkrxqp branch from 7f9003b to 186d00a Compare September 30, 2025 16:31
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.

2 participants