Cleanup command line options & documentation
Many commands like use and pin and rep can work on a Workspace or an individual project. We should offer project.use and workspace.use as aliases that enforce a respective interpretation. If the qualified command syntax is not used then if the current working directory is a project the command is mapped to project.command and else if the working directory is a workspace it is mapped to workspace.command otherwise it is an error as it's not clear what was meant.
I can work on this, but need to clarify a bit.
Many commands like use and pin and rep can work on a Workspace or an individual project. We should offer project.use and workspace.use as aliases that enforce a respective interpretation.
It sort of makes sense that these would be somewhat different when working on workspace vs project. However for use, pin, and rep I can't actually think of the differences. Aside perhaps from whether a project's nimble file is updated. But would it also affect the actual dependencies, etc?
If the qualified command syntax is not used then if the current working directory is a project the command is mapped to project.command and else if the working directory is a workspace it is mapped to workspace.command otherwise it is an error as it's not clear what was meant.
This makes sense. We're just assuming folders with nimble files are projects?
This makes sense. We're just assuming folders with nimble files are projects?
No, we detect the workspace and if the current working directory is a workspace then it's a workspace command.
BTW since I wrote this I changed my mind: The syntax should be atlas cmd -p # project interpretation vs atlas cmd -w # workspace interpretation
No, we detect the workspace and if the current working directory is a workspace then it's a workspace command.
Ah ok, we just check for workspace first. I still don't really know what we do differently, but I can look at the code.
BTW since I wrote this I changed my mind: The syntax should be atlas cmd -p # project interpretation vs atlas cmd -w # workspace interpretation
That should be easier to do.