pew-org/pew

Add a "temp" alias for mktmpenv

Opened this issue · 3 comments

I know mktmpenv is compatible with virtualenvwrapper, but as someone who's never used virtualenvwrapper, I find the name dreadfully ugly. Would it be possible to add an alias temp for it? To my mind, the usage pew temp is much more natural.

If the idea is acceptable, I'd be willing to create a PR for this.

(A more significant feature would be to add the ability to have user-defined aliases. But I'm not sure I can think of any other case where I'd want that, so it may be a case of YAGNI).

Yeah, mktmpenv is a bit too Unix-y as a name :/

I'm not against aliases in other contexts, but I'm wary of adding duplication, which could just confuse users...
Maybe only one of the 2 alternatives should be documented, but does this mean that we should deprecate mktmpenv?

Before committing to it, I'd like to read some drive-by comments by anyone who might have an opinion on this

Rather than deprecating mktmpenv it could be documented as "included for virtualenvwrapper compatibility", which might be less confusing. But agreed it's probably worth getting some extra feedback on this.

What about adding a "--temp" parameter to "pew new", so one can explicitly require a named environment to be considered as a temporary one when using "pew new x --temp" ? I mean: why do we need a dedicated command to build a temporary environment, when there's already a command to build environments and that "being temporary" could be considered as an "option" of that command?

[Updated:]
Actually, the question is more: do we need support for temporary environments? There are mainly two features provided by them: (1) they are automatically named and (2) they are automatically removed (more or less, see #188). Cannot we provide these two features as flags around "pew new"? In that case, one could see "mktmpenv" an "alias" of "pew new" with some "nice" defaults?)