mirror of
https://github.com/denisidoro/navi
synced 2024-11-22 03:23:05 +00:00
Print an empty line between previews (#536)
This commit is contained in:
parent
30fbb30514
commit
c9701db6ca
4 changed files with 9 additions and 5 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -320,7 +320,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "navi"
|
||||
version = "2.16.0"
|
||||
version = "2.16.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "navi"
|
||||
version = "2.16.0"
|
||||
version = "2.16.1"
|
||||
authors = ["Denis Isidoro <denis_isidoro@live.com>"]
|
||||
edition = "2018"
|
||||
description = "An interactive cheatsheet tool for the command-line"
|
||||
|
|
|
@ -76,14 +76,13 @@ fn prompt_finder(
|
|||
};
|
||||
|
||||
let exe = fs::exe_string();
|
||||
let extra = extra_preview.clone().unwrap_or_default();
|
||||
|
||||
let preview = if cfg!(target_os = "windows") {
|
||||
format!(
|
||||
r#"(@echo.{{+}}{eof}{{q}}{eof}{name}{eof}{extra}) | {exe} preview-var-stdin"#,
|
||||
exe = exe,
|
||||
name = variable_name,
|
||||
extra = extra,
|
||||
extra = extra_preview.clone().unwrap_or_default(),
|
||||
eof = EOF,
|
||||
)
|
||||
} else {
|
||||
|
@ -97,7 +96,10 @@ fn prompt_finder(
|
|||
)" "{name}"; {extra}"#,
|
||||
exe = exe,
|
||||
name = variable_name,
|
||||
extra = extra,
|
||||
extra = extra_preview
|
||||
.clone()
|
||||
.map(|e| format!(" echo; {}", e))
|
||||
.unwrap_or_default(),
|
||||
eof = EOF,
|
||||
)
|
||||
};
|
||||
|
|
|
@ -15,6 +15,8 @@ pub fn main() -> Result<()> {
|
|||
|
||||
if let Some(extra) = parts.next() {
|
||||
if !extra.is_empty() {
|
||||
print!("");
|
||||
|
||||
shell::out()
|
||||
.arg(extra)
|
||||
.spawn()
|
||||
|
|
Loading…
Reference in a new issue