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

Command run short CLI options -r and -E (for --rm and --entrypoint respectively) #5466

Open
serious-angel opened this issue Sep 21, 2024 · 0 comments

Comments

@serious-angel
Copy link

Description

Dear Developers,

Thank you very much for the ineffably marvelous project... 🪐

Considering the absence of some short options in usage for command run, I just wanted to clarify the rationale behind it except an safety trait or a protection against a mistake of an accidental container removal.


For instance, what if the call would add the short option alias for --rm as the following?:

flags.BoolVar(&copts.autoRemove, "rm", false, "Automatically remove the container and its associated anonymous volumes when it exits")

flags.BoolVar(&copts.autoRemove, "rm", "r", false, "Automatically remove the container and its associated anonymous volumes when it exits")

This, in turn, would allow to shorten it:

$ # docker run -it --rm -- 'debian:bookworm' bash;
$ docker run -rit -- 'debian:bookworm' bash;

Similarly, short option alias -E for --entrypoint:

flags.StringVar(&copts.entrypoint, "entrypoint", "", "Overwrite the default ENTRYPOINT of the image")

flags.StringVar(&copts.entrypoint, "entrypoint", "E", "", "Overwrite the default ENTRYPOINT of the image")
$ # docker run -it --rm --entrypoint '/bin/dash' -- 'debian:bookworm';
$ docker run -ritE '/bin/dash' -- 'debian:bookworm';

Would there be some kind of conflict involved if added?

Best and kind regards ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant