Skip to content

Commit

Permalink
fix: Only use shellwords parsing on unix platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 5, 2022
1 parent bed9ace commit 7767703
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,16 @@ fn command_mode(cx: &mut Context) {

// Handle typable commands
if let Some(cmd) = cmd::TYPABLE_COMMAND_MAP.get(parts[0]) {
let args = shellwords::shellwords(input);
let args = if cfg!(unix) {
shellwords::shellwords(input)
} else {
// Windows doesn't support POSIX, so fallback for now
parts
.into_iter()
.map(|part| part.into())
.collect::<Vec<_>>()
};

if let Err(e) = (cmd.fun)(cx, &args[1..], event) {
cx.editor.set_error(format!("{}", e));
}
Expand Down

0 comments on commit 7767703

Please sign in to comment.