Repository: thefuck
Issue: Terminal input fucked after running fuck
Labels: osx

Scenario: using `ssh-add` to add a key for github.

``` bash
$ ssh-add add ~/.ssh/github_rsa
add: No such file or directory
Enter passphrase for .ssh/github_rsa:
```

Oops, but we're perfect individuals who only run perfect commands, so let's fix it.

``` bash
$ fuck
Enter passphrase for .ssh/github_rsa: No fucks given
$
```

Strange.  Let me just re-type the command myself, like an animal.

```
$
```

My keyboard's not working!

Pressing `enter` pulls up a new prompt... but on the same line.

```
$$$$$
```

I can hit `^C`, though, so that's cool.

```
$^C
$
```

But characters I type don't appear.

---

System info:

```
$ thefuck --version
The Fuck 3.9 using Python 2.7.10
$ /usr/local/bin/bash --version
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin15.4.0)
```

OS X 10.11.5

Debug output:

```
$ ssh-add add .ssh/github_rsa
add: No such file or directory
Enter passphrase for .ssh/github_rsa: ^C

$ fuck
DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'history_limit': None,
 'no_colors': False,
 'priority': {},
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'user_dir': PosixPath('/Users/mechcozmo/.config/thefuck'),
 'wait_command': 3}
Enter passphrase for .ssh/github_rsa: DEBUG: Execution timed out!
DEBUG: Call: ssh-add add .ssh/github_rsa; with env: {'HISTTIMEFORMAT': '[%F %T] ', 'PYTHONIOENCODING': 'utf-8', 'GIT_TRACE': '1', 'HISTFILE': '/Users/mechcozmo/.bash_eternal_history', 'VERSIONER_PYTHON_PREFER_32_BIT': 'no', 'TERM_PROGRAM_VERSION': '3.0.2', 'TMPDIR': '/var/folders/5k/9kwxxzyn7wg0zwhzc3sqzb64p96blq/T/', 'LOGNAME': 'mechcozmo', 'USER': 'mechcozmo', 'HOME': '/Users/mechcozmo', 'PATH': '/Users/mechcozmo/.rbenv/shims:/Users/mechcozmo/.pyenv/shims:/Users/mechcozmo/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', 'HISTSIZE': '', 'TERM_PROGRAM': 'iTerm.app', 'LANG': 'C', 'THEFUCK_DEBUG': 'true', 'TERM': 'xterm-256color', 'SHELL': '/usr/local/bin/bash', 'COLORFGBG': '12;8', 'PROD_ACCOUNT_NUMBER': '201164921408', 'PYENV_SHELL': 'bash', 'VERSIONER_PYTHON_VERSION': '2.7', 'SHLVL': '1', 'TF_ALIAS': 'fuck', 'SECURITYSESSIONID': '186a8', 'XPC_FLAGS': '0x0', 'RBENV_SHELL': 'bash', 'ITERM_SESSION_ID': 'w0t4p1:F8ACDA41-3142-455A-9F67-40215A594182', 'EDITOR': 'vim', 'HISTFILESIZE': '', 'TF_SHELL_ALIASES': "alias fuck='TF_CMD=$(TF_ALIAS=fuck PYTHONIOENCODING=utf-8 TF_SHELL_ALIASES=$(alias) thefuck $(fc -ln -1)) && eval $TF_CMD && history -s $TF_CMD'", 'TERM_SESSION_ID': 'w0t4p1:F8ACDA41-3142-455A-9F67-40215A594182', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.xODNkSyexM/Listeners', 'PYTHONPATH': '/usr/local/Cellar/thefuck/3.9/libexec/lib/python2.7/site-packages:/usr/local/Cellar/thefuck/3.9/libexec/vendor/lib/python2.7/site-packages', 'XPC_SERVICE_NAME': '0', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.9h2XVxuLr8/Render', 'ITERM_PROFILE': 'Default', 'LC_ALL': 'C', '_': '/usr/local/bin/thefuck', '__CF_USER_TEXT_ENCODING': '0x2C932E77:0x0:0x0', 'PWD': '/Users/mechcozmo', 'COMMAND_MODE': 'unix2003'}; took: 0:00:03.046685
DEBUG: Importing rule: apt_get; took: 0:00:00.001687
DEBUG: Importing rule: apt_get_search; took: 0:00:00.003771
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.004499
DEBUG: Importing rule: brew_install; took: 0:00:00.003910
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.003622
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000809
DEBUG: Importing rule: brew_upgrade; took: 0:00:00.003854
DEBUG: Importing rule: cargo; took: 0:00:00.003126
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.001007
DEBUG: Importing rule: cd_correction; took: 0:00:00.005087
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000640
DEBUG: Importing rule: cd_parent; took: 0:00:00.002242
DEBUG: Importing rule: chmod_x; took: 0:00:00.000500
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000702
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000974
DEBUG: Importing rule: cpp11; took: 0:00:00.003622
DEBUG: Importing rule: dirty_untar; took: 0:00:00.013058
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.003445
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.002845
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000489
DEBUG: Importing rule: docker_not_command; took: 0:00:00.002116
DEBUG: Importing rule: dry; took: 0:00:00.004838
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000810
DEBUG: Importing rule: fix_file; took: 0:00:00.007477
DEBUG: Importing rule: git_add; took: 0:00:00.003243
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.003687
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000758
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000673
DEBUG: Importing rule: git_checkout; took: 0:00:00.000776
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.003937
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.003838
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.003716
DEBUG: Importing rule: git_not_command; took: 0:00:00.003717
DEBUG: Importing rule: git_pull; took: 0:00:00.000732
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.003627
DEBUG: Importing rule: git_push; took: 0:00:00.000662
DEBUG: Importing rule: git_push_force; took: 0:00:00.000816
DEBUG: Importing rule: git_push_pull; took: 0:00:00.004589
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.002933
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000733
DEBUG: Importing rule: git_stash; took: 0:00:00.000696
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000828
DEBUG: Importing rule: go_run; took: 0:00:00.003845
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.003950
DEBUG: Importing rule: grep_recursive; took: 0:00:00.003931
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.003886
DEBUG: Importing rule: has_exists_script; took: 0:00:00.003750
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.004076
DEBUG: Importing rule: history; took: 0:00:00.003378
DEBUG: Importing rule: java; took: 0:00:00.003591
DEBUG: Importing rule: javac; took: 0:00:00.004146
DEBUG: Importing rule: lein_not_task; took: 0:00:00.004115
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.003457
DEBUG: Importing rule: ls_lah; took: 0:00:00.003817
DEBUG: Importing rule: man; took: 0:00:00.000757
DEBUG: Importing rule: man_no_space; took: 0:00:00.003388
DEBUG: Importing rule: mercurial; took: 0:00:00.000689
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000699
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.004517
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.003691
DEBUG: Importing rule: no_command; took: 0:00:00.003124
DEBUG: Importing rule: no_such_file; took: 0:00:00.000477
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000779
DEBUG: Importing rule: open; took: 0:00:00.003863
DEBUG: Importing rule: pacman; took: 0:00:00.004452
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.003371
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000949
DEBUG: Importing rule: python_command; took: 0:00:00.003797
DEBUG: Importing rule: python_execute; took: 0:00:00.003606
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000599
DEBUG: Importing rule: rm_dir; took: 0:00:00.000708
DEBUG: Importing rule: rm_root; took: 0:00:00.004196
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.003314
DEBUG: Importing rule: sl_ls; took: 0:00:00.003528
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000708
DEBUG: Importing rule: sudo; took: 0:00:00.000529
DEBUG: Importing rule: switch_lang; took: 0:00:00.000458
DEBUG: Importing rule: systemctl; took: 0:00:00.001227
DEBUG: Importing rule: test.py; took: 0:00:00.006401
DEBUG: Importing rule: tmux; took: 0:00:00.000913
DEBUG: Importing rule: touch; took: 0:00:00.003633
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000712
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000841
DEBUG: Importing rule: unknown_command; took: 0:00:00.003609
DEBUG: Importing rule: vagrant_up; took: 0:00:00.000656
DEBUG: Importing rule: whois; took: 0:00:00.004475
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.003588
No fucks given
DEBUG: Total took: 0:00:03.306391
```