mirror of
https://github.com/denisidoro/navi.git
synced 2026-01-23 02:14:19 +00:00
Tried to update to powershell
Signed-off-by: alexis-opolka <53085471+alexis-opolka@users.noreply.github.com>
This commit is contained in:
parent
31b831317a
commit
0c6684a921
2 changed files with 10 additions and 1 deletions
|
|
@ -63,7 +63,14 @@ fn prompt_finder(
|
|||
|
||||
let exe = fs::exe_string();
|
||||
|
||||
let preview = if CONFIG.shell().contains("cmd.exe") {
|
||||
let preview = if CONFIG.shell().contains("powershell.exe"){
|
||||
format!(
|
||||
r#"({{+}}@'{{q}}'@@'{name}'@{extra}) | {exe} preview-var-stdin"#,
|
||||
exe = exe,
|
||||
name = variable_name,
|
||||
extra = extra_preview.clone().unwrap_or_default(),
|
||||
)
|
||||
} else if CONFIG.shell().contains("cmd.exe") {
|
||||
format!(
|
||||
r#"(@echo.{{+}}{eof}{{q}}{eof}{name}{eof}{extra}) | {exe} preview-var-stdin"#,
|
||||
exe = exe,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ impl Display for Shell {
|
|||
Self::Fish => "fish",
|
||||
Self::Elvish => "elvish",
|
||||
Self::Nushell => "nushell",
|
||||
Self::PowerShell => "powershell"
|
||||
};
|
||||
|
||||
write!(f, "{s}")
|
||||
|
|
@ -36,6 +37,7 @@ impl Runnable for Input {
|
|||
Shell::Fish => include_str!("../../shell/navi.plugin.fish"),
|
||||
Shell::Elvish => include_str!("../../shell/navi.plugin.elv"),
|
||||
Shell::Nushell => include_str!("../../shell/navi.plugin.nu"),
|
||||
Shell::PowerShell => include_str!("../../shell/navi.plugin.ps1"),
|
||||
};
|
||||
|
||||
println!("{content}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue