Repository: pypa/virtualenv

Issue:
Integration with virtualenvwrapper
Congratulations on the rewrite.

I notice that `virtualenvwrapper` doesn't integrate with the new beta:

```
$ mkvirtualenv foo
ERROR: Environment '/Users/brettmz/.virtualenvs/foo' does not contain an activate script.
```

Sure enough - I believe it is looking for a script `activate` - but the script file now depends on the shell - `activate.sh` etc. 

It would be good if this could work somehow - would it be reasonable to create / link a default `activate` script for this case?  Or should virtualenvwrapper be updated?

Discussion:

Patch:
diff --git a/src/virtualenv/activation/bash/__init__.py b/src/virtualenv/activation/bash/__init__.py
index c89b42ed..df3f7727 100644
--- a/src/virtualenv/activation/bash/__init__.py
+++ b/src/virtualenv/activation/bash/__init__.py
@@ -12,3 +12,6 @@ class BashActivator(ViaTemplateActivator):
 
     def templates(self):
         yield Path("activate.sh")
+
+    def as_name(self, template):
+        return template.stem
diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py
index 3f6b46bb..d9d0a14d 100644
--- a/src/virtualenv/activation/via_template.py
+++ b/src/virtualenv/activation/via_template.py
@@ -39,7 +39,11 @@ class ViaTemplateActivator(Activator):
     def _generate(self, replacements, templates, to_folder, creator):
         for template in templates:
             text = self.instantiate_template(replacements, template, creator)
-            (to_folder / template).write_text(text, encoding="utf-8")
+            dest = to_folder / self.as_name(template)
+            dest.write_text(text, encoding="utf-8")
+
+    def as_name(self, template):
+        return template.name
 
     def instantiate_template(self, replacements, template, creator):
         # read text and do replacements


Test patch:
diff --git a/tests/unit/activation/test_bash.py b/tests/unit/activation/test_bash.py
index d5d8ad9b..b5ff9285 100644
--- a/tests/unit/activation/test_bash.py
+++ b/tests/unit/activation/test_bash.py
@@ -7,7 +7,7 @@ def test_bash(raise_on_non_source_class, activation_tester):
     class Bash(raise_on_non_source_class):
         def __init__(self, session):
             super(Bash, self).__init__(
-                BashActivator, session, "bash", "activate.sh", "sh", "You must source this script: $ source "
+                BashActivator, session, "bash", "activate", "sh", "You must source this script: $ source "
             )
 
     activation_tester(Bash)