mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: can't open and reveal paths with spaces on Windows (#526)
This commit is contained in:
parent
9083535741
commit
6145bc38dc
2 changed files with 7 additions and 7 deletions
|
|
@ -26,13 +26,13 @@ edit = [
|
|||
{ exec = 'code "%*"', orphan = true, for = "windows" },
|
||||
]
|
||||
open = [
|
||||
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" },
|
||||
{ exec = 'open "$@"', desc = "Open", for = "macos" },
|
||||
{ exec = 'start "%1"', orphan = true, desc = "Open", for = "windows" }
|
||||
{ exec = 'xdg-open "$@"', desc = "Open", for = "linux" },
|
||||
{ exec = 'open "$@"', desc = "Open", for = "macos" },
|
||||
{ exec = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }
|
||||
]
|
||||
reveal = [
|
||||
{ exec = 'open -R "$1"', desc = "Reveal", for = "macos" },
|
||||
{ exec = 'explorer /select,%1', orphan = true, desc = "Reveal", for = "windows" },
|
||||
{ exec = 'open -R "$1"', desc = "Reveal", for = "macos" },
|
||||
{ exec = 'explorer /select, "%1"', orphan = true, desc = "Reveal", for = "windows" },
|
||||
{ exec = '''exiftool "$1"; echo "Press enter to exit"; read''', block = true, desc = "Show EXIF", for = "unix" },
|
||||
]
|
||||
extract = [
|
||||
|
|
|
|||
4
yazi-plugin/src/external/shell.rs
vendored
4
yazi-plugin/src/external/shell.rs
vendored
|
|
@ -186,8 +186,8 @@ mod parser {
|
|||
let args = parse("echo 'abc xyz' '%1' %2", &["111", "222"]);
|
||||
assert_eq!(args, ["echo", "abc xyz", "111", "222"]);
|
||||
|
||||
let args = parse("echo 'abc \"\"xyz' '%1' %2", &["111", "222"]);
|
||||
assert_eq!(args, ["echo", "abc \"\"xyz", "111", "222"]);
|
||||
let args = parse(r#"echo 'abc ""xyz' '%1' %2"#, &["111", "222"]);
|
||||
assert_eq!(args, ["echo", r#"abc ""xyz"#, "111", "222"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue