aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorBlaž Hrastnik2022-01-05 02:01:30 +0000
committerBlaž Hrastnik2022-01-05 02:01:30 +0000
commit77677039795811505d8205f4efa082fc598492fc (patch)
tree1a6bcf940ac98fd6d9080e22e7e9189ff73a6b9f /helix-term
parentbed9aced5f4d745d74ffff1c10b6dc4acef8129e (diff)
fix: Only use shellwords parsing on unix platforms
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index a7b34062..cac6f582 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -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));
}