-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Initial docker command impl #695
Initial docker command impl #695
Conversation
Cool :) Glad to see someone starting on a docker command. One suggestion I have here, if you want to wrap the commandline From there, we can make it an optional feature of Nu (we did this with |
That makes sense, I will work on making it a plugin instead of a built in command. Thank you for the feedback, I have enjoyed working on and contributing to this project. |
@JonnyWalker81 glad to hear it! We're working on our book for contributors, and there's a chapter on plugins if you're interested: https://github.com/nushell/contributor-book/blob/master/en/plugins.md |
I implemented a Plugin for the Docker command and removed the built-in Docker command I previously proposed. The documentation in the contributor book was helpful, thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few comments on the code.
You may also want to look at how we made some plugins optional based on what features were available (you can see how we've been doing it in the Cargo.toml file). Here, we will probably want users to opt-in, since not everyone will have the docker
application on their system.
src/cli.rs
Outdated
@@ -248,6 +248,7 @@ pub async fn cli() -> Result<(), Box<dyn Error>> { | |||
whole_stream_command(Next), | |||
whole_stream_command(Previous), | |||
whole_stream_command(Debug), | |||
// whole_stream_command(Docker), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just remove this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had removed the commented out code, sorry about that.
src/commands.rs
Outdated
@@ -11,6 +11,7 @@ pub(crate) mod config; | |||
pub(crate) mod cp; | |||
pub(crate) mod date; | |||
pub(crate) mod debug; | |||
// pub(crate) mod docker; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
src/commands.rs
Outdated
@@ -79,6 +80,7 @@ pub(crate) use config::Config; | |||
pub(crate) use cp::Cpy; | |||
pub(crate) use date::Date; | |||
pub(crate) use debug::Debug; | |||
// pub(crate) use docker::Docker; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
I added a |
Great! |
How can I try this locally? Tried |
Initial implementation of Docker commands. It currently supports the
ps
andimages
Docker commands. It should address Issue #619.