summaryrefslogtreecommitdiffstats
path: root/src/verb/builtin.rs
diff options
context:
space:
mode:
authorAlexander Kastler <github@xaka.eu>2022-04-17 09:49:11 +0200
committerAlexander Kastler <github@xaka.eu>2022-04-17 09:49:11 +0200
commit4db12c67d383d6a11ffa74b621e3eb34b106a400 (patch)
tree638a8feeca93b879757cb00d837de16e23927ef5 /src/verb/builtin.rs
parenteb56488b123fabb682ec687b0149e149de644957 (diff)
Add cfg for mkdir command to separate between unix/windows #535
Diffstat (limited to 'src/verb/builtin.rs')
-rw-r--r--src/verb/builtin.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/verb/builtin.rs b/src/verb/builtin.rs
index 69fc310..7cdc4f0 100644
--- a/src/verb/builtin.rs
+++ b/src/verb/builtin.rs
@@ -129,12 +129,20 @@ pub fn builtin_verbs() -> Vec<Verb> {
#[cfg(feature="clipboard")]
internal(input_paste)
.with_key(key!(ctrl-v)),
+ #[cfg(unix)]
external(
"mkdir {subpath}",
"mkdir -p {subpath:path-from-directory}",
StayInBroot,
)
.with_shortcut("md"),
+ #[cfg(windows)]
+ external(
+ "mkdir {subpath}",
+ "cmd /c mkdir {subpath:path-from-directory}",
+ StayInBroot,
+ )
+ .with_shortcut("md"),
external(
"move {newpath}",
"mv {file} {newpath:path-from-parent}",