Repository: python-poetry/poetry

Issue:
`poetry shell` puts Terminal in broken state and does not function
<!--
  Hi there! Thank you for discovering and submitting an issue.

  Before you submit this; let's make sure of a few things.
  Please make sure the following boxes are ticked if they are correct.
  If not, please try and fulfill these first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option).

- **OS version and name**: Mac OS Mojave (10.14.6)
- **Poetry version**: 1.0.0b5
- **Link of a [Gist](https://gist.github.com/) with the contents of your pyproject.toml file**: https://gist.github.com/orokusaki/0750bd0dfef13324353d302d74a48254

## Further environment notes

  - Python 2.7.17 and Python 3.7.5 installed via Homebrew
  - Poetry installed via `curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | POETRY_PREVIEW=1 python`

## Issue

Upon using `poetry shell -vvv` (also tried without `-vvv` flag) the shell appears to spawn, but when I attempt to type any command, no text appears in the Terminal, and when I hit <kbd>return</kbd> I get what you can see in the screenshot I attached (the screenshot reflects the state after I typed a few characters and then hit <kbd>return</kbd> twice). If I send `SIGINT` to the shell (<kbd>CTRL</kbd> + <kbd>C</kbd>), the Terminal drops to a new line with the same output and lack of responsiveness, and upon sending `SIGINT` many times I'm still left with the Terminal in an unusable state. If I attempt to close Terminal, I get "*Closing this tab will terminate the running processes: bash, Python.*", which indicates that some code in Poetry is still hung up.

### Screenshot

<img src="https://user-images.githubusercontent.com/97720/69014062-6a16bf80-0954-11ea-9717-7ff259875eea.png">


Discussion:
Also have the same problem, between this and #1601 makes poetry unusable on Arch Linux.
On a related note, fish shell functions normally even after `poetry shell` but python REPL also has the same problem when opened from within a virtual environment activated by poetry v1.0.0b4 (typed text not visible, but pressing enter shows that the input was registered and whatever was typed, executes).
Same issue here. I'm using Arch Linux with terminator. The latest 1.0.0b6 version still hasn't fixed this yet.
As I'm using Arch Linux as well I should be able to reproduce it @L0stLink, @kawing-chiu .

Can you tell more about your config? Which desktop environment, which terminal and which shell are you using?

Could it be, that it has just something to do how the color names are interpreted and you end up in a state where foreground=background? :thinking: 

Resolving patch:
diff --git a/poetry/utils/shell.py b/poetry/utils/shell.py
--- a/poetry/utils/shell.py
+++ b/poetry/utils/shell.py
@@ -58,7 +58,9 @@ def activate(self, env):  # type: (VirtualEnv) -> None
                 self._path, ["-i"], dimensions=(terminal.height, terminal.width)
             )
 
-        c.setecho(False)
+        if not self._name == "bash":
+            c.setecho(False)
+
         activate_script = self._get_activate_script()
         bin_dir = "Scripts" if WINDOWS else "bin"
         activate_path = env.path / bin_dir / activate_script


Test patch: