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

Move context identifier to the front #646

Open
mbrodala opened this issue Feb 7, 2018 · 0 comments
Open

Move context identifier to the front #646

mbrodala opened this issue Feb 7, 2018 · 0 comments

Comments

@mbrodala
Copy link
Contributor

mbrodala commented Feb 7, 2018

Right now the context identifier (local, dry-run or none) must be passed as last word after a command but before the arguments of the command, e.g.

nanobox evar add local ENVIRONMENT=local MY_EVAR="This is mine"

It is very easy to forget this very specific and special rule and misplace the local here.

This is why I suggest to move the context identifier right after the nanobox command:

nanobox local evar add ENVIRONMENT=local MY_EVAR="This is mine"

This way it is clear right away what context a command is executed in and I suspect that argument parsing and command processing can be simplified too.

Here's an example from Composer:

composer require foo/bar # Install a package locally
composer global require foo/bar # Install a package globally

Even though the logic is different (local by default, global/remote as special case) it is clear right away what will happen and it's easy to remember.

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

No branches or pull requests

1 participant