Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uutils/coreutils mkdir command into nushell #10515

Closed
KAAtheWiseGit opened this issue Sep 27, 2023 · 6 comments · Fixed by #10785
Closed

add uutils/coreutils mkdir command into nushell #10515

KAAtheWiseGit opened this issue Sep 27, 2023 · 6 comments · Fixed by #10785
Assignees
Labels
coreutils-uutils Changes relating to coreutils/uutils enhancement New feature or request
Milestone

Comments

@KAAtheWiseGit
Copy link
Contributor

KAAtheWiseGit commented Sep 27, 2023

Related problem

Part of the porting of uutils to Nushell.

Describe the solution you'd like

Port uutils' mkdir as umkidr.

@KAAtheWiseGit KAAtheWiseGit added enhancement New feature or request needs-triage An issue that hasn't had any proper look labels Sep 27, 2023
@KAAtheWiseGit
Copy link
Contributor Author

uutils' mkdir has two functions. The first is exec. It takes an iterator with OsString's and creates those directories. The other is mkdir, which takes a Path and creates just one directory. Both of them have the same options. The difference is that exec accounts for this:

        // Special case to match GNU's behavior:
        // mkdir -p foo/. should work and just create foo/
        // std::fs::create_dir("foo/."); fails in pure Rust

Would it be better for Nushell to use mkdir-only here?

@sholderbach sholderbach added coreutils-uutils Changes relating to coreutils/uutils and removed needs-triage An issue that hasn't had any proper look labels Sep 27, 2023
@KAAtheWiseGit
Copy link
Contributor Author

@uutils' mkdir changes got released yesterday, so I'll start making a PR this week.

@KAAtheWiseGit
Copy link
Contributor Author

Is there a consensus on the --parents flag? Should it be enabled by default as with Nushell's mkdir?

@amtoine
Copy link
Member

amtoine commented Oct 17, 2023

Is there a consensus on the --parents flag? Should it be enabled by default as with Nushell's mkdir?

maybe we can start by keeping the same behaviour as now?
that should be fairly easy to switch the default value, right? 😋

@KAAtheWiseGit
Copy link
Contributor Author

I just found out both uu_cp and uu_mkdir depend on clap. I think this is a problem.

@KAAtheWiseGit
Copy link
Contributor Author

Made a umkdir draft PR #10785.

fdncred pushed a commit that referenced this issue Oct 30, 2023
A `mkdir` command, which uses `uu_mkdir` as backend.

close #10515.
@hustcer hustcer added this to the v0.87.0 milestone Oct 31, 2023
hardfau1t pushed a commit to hardfau1t/nushell that referenced this issue Dec 14, 2023
A `mkdir` command, which uses `uu_mkdir` as backend.

close nushell#10515.
dmatos2012 pushed a commit to dmatos2012/nushell that referenced this issue Feb 20, 2024
A `mkdir` command, which uses `uu_mkdir` as backend.

close nushell#10515.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coreutils-uutils Changes relating to coreutils/uutils enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants