diff --git a/src/commands/core/actor.rs b/src/commands/core/actor.rs index 91a1846..ae3d413 100644 --- a/src/commands/core/actor.rs +++ b/src/commands/core/actor.rs @@ -63,7 +63,7 @@ fn prompt_finder( let exe = fs::exe_string(); - let preview = if cfg!(target_os = "windows") { + let preview = if CONFIG.shell().contains("cmd.exe") { format!( r#"(@echo.{{+}}{eof}{{q}}{eof}{name}{eof}{extra}) | {exe} preview-var-stdin"#, exe = exe, diff --git a/src/common/shell.rs b/src/common/shell.rs index 7e275e7..064f28f 100644 --- a/src/common/shell.rs +++ b/src/common/shell.rs @@ -11,7 +11,8 @@ pub enum Shell { Zsh, Fish, Elvish, - Nushell + Nushell, + PowerShell } #[derive(Error, Debug)]