Repository navigation
implement exec for unix platforms - #2495
Conversation
|
@almindor Is this a Linux/Mac only command, or does it work in Windows too? |
This is unix only, it's part of the |
thegedge
left a comment
There was a problem hiding this comment.
Just a few small things, but other than that, should be good to go!
I also wanted to note that I see POSIX mentioned (both here and the issue this PR fixes). I want to call out the nushell philosophy from our contributor book, specifically POSIX compliance is a non goal. Just wanted to make sure that was clear 🙂
Compliance is a non-goal and I never said that nu should be POSIX compliant. The reason why I listed is to show that
|
|
This should be good to go now. |
thegedge
left a comment
There was a problem hiding this comment.
Basic functionality works on macOS and Windows 🙌
We may need to expand for env vars, but let's start here and expand.
|
On MacOs, I run the example |
Yep. Remember, |
Indeed, @thegedge explained it well. Maybe I could add more info in the help description to make it clear exec replaces the shell. |
Fix for #1799 by implementing a
execbuilt-in using thestd::os::unix::process::CommandExttrait.NOTE: one thing I couldn't figure out how to do is for the exec args to allow
-parampassing, e.g.exec /some/cmd do_somethingworks butexec /some/cmd --paramwon't because the parser thinks--paramis forexec.