-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add --modmandir option. #90
Add --modmandir option. #90
Conversation
@fbrnc I've tested a variety of different combinations, but let me know if you come across anything untoward. # examples
modman init htdocs .modman-local
modman clone --modmandir .modman-local https://github.com/AOEpeople/Aoe_Profiler
modman undeploy --modmandir .modman-local Aoe_Profiler
modman deploy --modmandir .modman-local Aoe_Profiler
modman undeploy --modmandir .modman-local Aoe_Profiler
modman deploy-all --modmandir .modman-local
modman remove --modmandir .modman-local Aoe_Profiler NB: Bash completion for the new option isn't currently supported. The command automodman also isn't supported since the command appears to crash for me. |
1da387e
to
f0da94b
Compare
I like the idea alright but the commands are very long. What about a syntactical improvement? I propose if the module name includes a ':' the part before the colon is the alternate modman directory suffix (local = .modman-local) and the part after is the module name. E.g.:
What do you think? |
@colinmollenhour I see where you're coming from, it definitely felt a bit verbose as I was typing out the tests / examples. I'm certainly not opposed to the idea of using a different syntax, but I can foresee potential complications implementing the one you suggest. For example the second argument for all VCS commands will likely be a remote URL and thus could be considered ambiguous so if determined on a global scope as it is currently, then it is arguably a suffix of https as opposed to a url starting https. Not insurmountable though for sure. |
Ok, so another character? Needs to not require shell escaping and not be a format used by git, hg or svn.. What about two colons?
So the regex would be like |
For the
|
Hi @colinmollenhour, hi @pocallaghan, Introducing a new syntax Another use case that comes into my mind is you could have a directory of development modules on your local devbox that you keep at a central place and you share between mutliple projects. |
You could create a symlink named ".modman-shared" to your central location. Just sayin. ;) One issue with the --modmandir case.. if a user wants to use only the alternate directory they need to have used "modman init" already to establish the location of the root. Also if the user later deletes the empty ".modman" directory because it is empty and they theink they don't need it, then the modman root will be unknown. Using a naming convention like I proposed means the directory/symlink itself would serve to establish the root even if no .modman directory exists (with a little work to support this scenario). I'm open to either way, but this is definitely a feature that will be hard to make changes to in the future so just wanted to make sure it was discussed before it is merged. |
I never use Trying to stick to the unix concepts of having small and simple tools that do one thing and do that very well, I'm all for adding the Briefly looking at @pocallaghan, that's what's already happening in this pull request, right? |
I agree about needing the flexibility, my point was just that the flexibility can still be achieved with the proposed shorter syntax by using symlinks. Another benefit would be that bash completion could be supported for the alternate module namespaces whereas with the currently implemented syntax there can be no autocompletion and it is much more lengthy and therefore more prone to typos. For example you might even forget which working copy of a package of modules you're working with whereas with a symlink pointing to it there can be no doubt/confusion. So for example: Proposed:
vs
|
Hi @colinmollenhour, good example! But to me the second option looks way more intuitive, doesn't require any knowledge on how |
Specifying --modmandir allows control over where modman will place / source code from. Effectively allowing multiple modman directories for a single install. Refs colinmollenhour#87.
f0da94b
to
3121117
Compare
Add --modmandir option.
Specifying --modmandir allows control over where modman will place /
source code from. Effectively allowing multiple modman directories for a
single install. Refs #87.