You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mkdir: expose main functionality for nushell #5321
From what I understand, exporting exec should be enough. The behavior is controlled by primitive types, so this part is easy. ValuesRef from clap poses a question, however. Could it be turned into a vector with .copied().collect() inside main?
Yep we can't expose ValuesRef. Nushell wouldn't like to depend on clap if possible (we need to find a solution for other utils too). However, we can just make it accept impl IntoIterator<OsString> instead.
I am doing a PR right now, and I wonder, if it makes more sense to expose mkdir function instead of exec. It doesn't have the dot stripping GNU idiosyncrasy and it won't need a signature refactor. Because the signature I came up with looks like this:
Activity
[-]`mkdir:`[/-][+]`mkdir`: expose main functionality for nushel[/+][-]`mkdir`: expose main functionality for nushel[/-][+]`mkdir`: expose main functionality for nushell[/+]kaathewisegit commentedon Sep 25, 2023
@tertsdiepraam, made an issue.
From what I understand, exporting
execshould be enough. The behavior is controlled by primitive types, so this part is easy.ValuesReffrom clap poses a question, however. Could it be turned into a vector with.copied().collect()inside main?tertsdiepraam commentedon Sep 25, 2023
Yep we can't expose ValuesRef. Nushell wouldn't like to depend on clap if possible (we need to find a solution for other utils too). However, we can just make it accept
impl IntoIterator<OsString>instead.kaathewisegit commentedon Sep 27, 2023
I am doing a PR right now, and I wonder, if it makes more sense to expose
mkdirfunction instead ofexec. It doesn't have the dot stripping GNU idiosyncrasy and it won't need a signature refactor. Because the signature I came up with looks like this:I'll also ask the Nushell team about it.
tertsdiepraam commentedon Sep 27, 2023
Interesting! Please make a PR. It's much easier to discuss if there's code we can reference.
kaathewisegit commentedon Oct 21, 2023
Closing this issue, as the PR got merged.
tertsdiepraam commentedon Oct 21, 2023
Excellent, thanks!