mkdir: make mkdir public and document it#5329
mkdir: make mkdir public and document it#5329cakebaker merged 1 commit intouutils:mainfrom kaathewisegit:main
mkdir: make mkdir public and document it#5329Conversation
|
@tertsdiepraam, opened the PR. It doesn't have much as of now, since I haven't made |
src/uu/mkdir/src/mkdir.rs
Outdated
| /// | ||
| /// ## Options | ||
| /// | ||
| /// * `recurisve` --- create parent directories for the given dirs, if they do |
There was a problem hiding this comment.
| /// * `recurisve` --- create parent directories for the given dirs, if they do | |
| /// * `recursive` --- create parent directories for the given dirs, if they do |
|
Thanks for opening the PR! For context for others, we were talking here: #5321. A little recap: The question is: what should be exposed?
Multiple directories is usually not good for nushell, because they what control over the errors and make them pretty with miette. So, we prefer not to print errors but to return them (with With that out of the way, here are my thoughts. I think it makes sense to expose a function for making a single directory and let nushell do the looping for good errors. I also think the GNU fix at least doesn't hurt for nushell, so I see no reason to exclude it. So, in my opinion, the GNU fix is in the wrong spot: it should be in |
- Made the `mkdir` function public. Added documentation, describing the behavior and parameters - Moved the GNU dot-stripping behavior from `exec` to `mkdir`.
mkdir: make exec public and document itmkdir: make mkdir public and document it
|
Rewrote the commit:
Changed the PR name/description appropriately. |
|
I think the PR is ready for review. |
tertsdiepraam
left a comment
There was a problem hiding this comment.
I won't merge this myself because I'm reviewing from the GH app, but this looks great!
| /// ## Trailing dot | ||
| /// | ||
| /// To match the GNU behavior, a path with the last directory being a single dot | ||
| /// (like `some/path/to/.`) is created (with the dot stripped). |
|
Thanks :) |
mkdirfunction public. Added documentation, describing the behavior and parametersexectomkdir.