Repository: thefuck
Issue: Enabling experimental instant mode causes The Fuck to stop working entirely
Labels: help wanted,zsh

<!-- If you have any issue with The Fuck, sorry about that, but we will do what we
can to fix that. Actually, maybe we already have, so first thing to do is to
update The Fuck and see if the bug is still there. -->

<!-- If it is (sorry again), check if the problem has not already been reported and
if not, just open an issue on [GitHub](https://github.com/nvbn/thefuck) with
the following basic information: -->

The output of `thefuck --version` (something like `The Fuck 3.1 using Python 3.5.0`):

    The Fuck 3.26 using Python 3.6.5

Your shell and its version (`bash`, `zsh`, *Windows PowerShell*, etc.):

    zsh 5.2 (x86_64-apple-darwin16.0)

Your system (Debian 7, ArchLinux, Windows, etc.):

    ProductName:    Mac OS X
    ProductVersion: 10.12.6
    BuildVersion:   16G1314   

How to reproduce the bug:

1. Add `--enable-experimental-instant-mode` to the alias initialization in `.zshrc`. 
2. Restart terminal or run `source ~/.zshrc`.

The Fuck completely stops working (i.e. it doesn't show any correction suggestions to any mistakes) and instead shows the following messages whenever I type the `fuck` command:
```
[WARN] PS1 doesn't contain user command mark, please ensure that PS1 is not changed after The Fuck alias initialization
No fucks given
```

The output of The Fuck with `THEFUCK_DEBUG=true` exported (typically execute `export THEFUCK_DEBUG=true` in your shell before The Fuck):

```
DEBUG: Run with settings: {'alter_history': True,
 'debug': True,
 'env': {'GIT_TRACE': '1', 'LANG': 'C', 'LC_ALL': 'C'},
 'exclude_rules': [],
 'history_limit': None,
 'instant_mode': True,
 'no_colors': False, 'priority': {},
 'repeat': False,
 'require_confirmation': True,
 'rules': [<const: All rules enabled>],
 'slow_commands': ['lein', 'react-native', 'gradle', './gradlew', 'vagrant'],
 'user_dir': PosixPath('/Users/xxxx/.config/thefuck'),
 'wait_command': 3, 'wait_slow_command': 15}[WARN] PS1 doesn't contain user command mark, please ensure that PS1 is not cha
nged after The Fuck alias initialization
DEBUG: Importing rule: adb_unknown_command; took: 0:00:00.000214
DEBUG: Importing rule: ag_literal; took: 0:00:00.000474
DEBUG: Importing rule: apt_get; took: 0:00:00.000945DEBUG: Importing rule: apt_get_search; took: 0:00:00.000372
DEBUG: Importing rule: apt_invalid_operation; took: 0:00:00.000967
DEBUG: Importing rule: apt_list_upgradable; took: 0:00:00.000493
DEBUG: Importing rule: apt_upgrade; took: 0:00:00.000481
DEBUG: Importing rule: aws_cli; took: 0:00:00.000517
DEBUG: Importing rule: brew_cask_dependency; took: 0:00:00.001909
DEBUG: Importing rule: brew_install; took: 0:00:00.000308
DEBUG: Importing rule: brew_link; took: 0:00:00.000751
DEBUG: Importing rule: brew_uninstall; took: 0:00:00.000569
DEBUG: Importing rule: brew_unknown_command; took: 0:00:00.000310
DEBUG: Importing rule: brew_update_formula; took: 0:00:00.000815
DEBUG: Importing rule: brew_upgrade; took: 0:00:00.000234
DEBUG: Importing rule: cargo; took: 0:00:00.000211
DEBUG: Importing rule: cargo_no_command; took: 0:00:00.000880
DEBUG: Importing rule: cd_correction; took: 0:00:00.002276
DEBUG: Importing rule: cd_mkdir; took: 0:00:00.000715
DEBUG: Importing rule: cd_parent; took: 0:00:00.000190
DEBUG: Importing rule: chmod_x; took: 0:00:00.000181
DEBUG: Importing rule: composer_not_command; took: 0:00:00.000530
DEBUG: Importing rule: cp_omitting_directory; took: 0:00:00.000730
DEBUG: Importing rule: cpp11; took: 0:00:00.000469
DEBUG: Importing rule: dirty_untar; took: 0:00:00.002174
DEBUG: Importing rule: dirty_unzip; took: 0:00:00.002918
DEBUG: Importing rule: django_south_ghost; took: 0:00:00.000261
DEBUG: Importing rule: django_south_merge; took: 0:00:00.000181
DEBUG: Importing rule: dnf_no_such_command; took: 0:00:00.001595
DEBUG: Importing rule: docker_not_command; took: 0:00:00.001042
DEBUG: Importing rule: dry; took: 0:00:00.000205
DEBUG: Importing rule: fab_command_not_found; took: 0:00:00.000666
DEBUG: Importing rule: fix_alt_space; took: 0:00:00.000501
DEBUG: Importing rule: fix_file; took: 0:00:00.006306
DEBUG: Importing rule: gem_unknown_command; took: 0:00:00.000752
DEBUG: Importing rule: git_add; took: 0:00:00.001006
DEBUG: Importing rule: git_add_force; took: 0:00:00.000503
DEBUG: Importing rule: git_bisect_usage; took: 0:00:00.000491
DEBUG: Importing rule: git_branch_delete; took: 0:00:00.000464
DEBUG: Importing rule: git_branch_exists; took: 0:00:00.000611
DEBUG: Importing rule: git_branch_list; took: 0:00:00.000525
DEBUG: Importing rule: git_checkout; took: 0:00:00.000526
DEBUG: Importing rule: git_commit_amend; took: 0:00:00.000564
DEBUG: Importing rule: git_diff_no_index; took: 0:00:00.000472
DEBUG: Importing rule: git_diff_staged; took: 0:00:00.000624
DEBUG: Importing rule: git_fix_stash; took: 0:00:00.000508
DEBUG: Importing rule: git_flag_after_filename; took: 0:00:00.000433
DEBUG: Importing rule: git_help_aliased; took: 0:00:00.000437
DEBUG: Importing rule: git_merge; took: 0:00:00.000431
DEBUG: Importing rule: git_merge_unrelated; took: 0:00:00.000412
DEBUG: Importing rule: git_not_command; took: 0:00:00.000529
DEBUG: Importing rule: git_pull; took: 0:00:00.000445
DEBUG: Importing rule: git_pull_clone; took: 0:00:00.000580
DEBUG: Importing rule: git_pull_uncommitted_changes; took: 0:00:00.000515
DEBUG: Importing rule: git_push; took: 0:00:00.000464
DEBUG: Importing rule: git_push_different_branch_names; took: 0:00:00.000410
DEBUG: Importing rule: git_push_force; took: 0:00:00.000620
DEBUG: Importing rule: git_push_pull; took: 0:00:00.000529
DEBUG: Importing rule: git_push_without_commits; took: 0:00:00.000566
DEBUG: Importing rule: git_rebase_merge_dir; took: 0:00:00.000467
DEBUG: Importing rule: git_rebase_no_changes; took: 0:00:00.000354
DEBUG: Importing rule: git_remote_delete; took: 0:00:00.000478
DEBUG: Importing rule: git_remote_seturl_add; took: 0:00:00.000342
DEBUG: Importing rule: git_rm_local_modifications; took: 0:00:00.000669
DEBUG: Importing rule: git_rm_recursive; took: 0:00:00.000473
DEBUG: Importing rule: git_rm_staged; took: 0:00:00.000637
DEBUG: Importing rule: git_stash; took: 0:00:00.000564
DEBUG: Importing rule: git_stash_pop; took: 0:00:00.000559
DEBUG: Importing rule: git_tag_force; took: 0:00:00.000478
DEBUG: Importing rule: git_two_dashes; took: 0:00:00.000575
DEBUG: Importing rule: go_run; took: 0:00:00.000496
DEBUG: Importing rule: gradle_no_task; took: 0:00:00.000999
DEBUG: Importing rule: gradle_wrapper; took: 0:00:00.000641
DEBUG: Importing rule: grep_arguments_order; took: 0:00:00.000504
DEBUG: Importing rule: grep_recursive; took: 0:00:00.000480
DEBUG: Importing rule: grunt_task_not_found; took: 0:00:00.000888
DEBUG: Importing rule: gulp_not_task; took: 0:00:00.000504
DEBUG: Importing rule: has_exists_script; took: 0:00:00.000489
DEBUG: Importing rule: heroku_multiple_apps; took: 0:00:00.000467
DEBUG: Importing rule: heroku_not_command; took: 0:00:00.000686
DEBUG: Importing rule: history; took: 0:00:00.000185
DEBUG: Importing rule: hostscli; took: 0:00:00.000639
DEBUG: Importing rule: ifconfig_device_not_found; took: 0:00:00.000682
DEBUG: Importing rule: java; took: 0:00:00.000606
DEBUG: Importing rule: javac; took: 0:00:00.000498
DEBUG: Importing rule: lein_not_task; took: 0:00:00.000772
DEBUG: Importing rule: ln_no_hard_link; took: 0:00:00.000442
DEBUG: Importing rule: ln_s_order; took: 0:00:00.000582
DEBUG: Importing rule: ls_all; took: 0:00:00.000501
DEBUG: Importing rule: ls_lah; took: 0:00:00.000595
DEBUG: Importing rule: man; took: 0:00:00.000429
DEBUG: Importing rule: man_no_space; took: 0:00:00.000190
DEBUG: Importing rule: mercurial; took: 0:00:00.000422
DEBUG: Importing rule: missing_space_before_subcommand; took: 0:00:00.000281
DEBUG: Importing rule: mkdir_p; took: 0:00:00.000496
DEBUG: Importing rule: mvn_no_command; took: 0:00:00.000501
DEBUG: Importing rule: mvn_unknown_lifecycle_phase; took: 0:00:00.000508
DEBUG: Importing rule: no_command; took: 0:00:00.000554
DEBUG: Importing rule: no_such_file; took: 0:00:00.000193
DEBUG: Importing rule: npm_missing_script; took: 0:00:00.001039
DEBUG: Importing rule: npm_run_script; took: 0:00:00.000451
DEBUG: Importing rule: npm_wrong_command; took: 0:00:00.000824
DEBUG: Importing rule: open; took: 0:00:00.000852
DEBUG: Importing rule: pacman; took: 0:00:00.000969
DEBUG: Importing rule: pacman_not_found; took: 0:00:00.000220
DEBUG: Importing rule: path_from_history; took: 0:00:00.000262
DEBUG: Importing rule: php_s; took: 0:00:00.000511
DEBUG: Importing rule: pip_unknown_command; took: 0:00:00.000527
DEBUG: Importing rule: port_already_in_use; took: 0:00:00.000427
DEBUG: Importing rule: prove_recursively; took: 0:00:00.000692
DEBUG: Importing rule: python_command; took: 0:00:00.000463
DEBUG: Importing rule: python_execute; took: 0:00:00.000503
DEBUG: Importing rule: quotation_marks; took: 0:00:00.000191
DEBUG: Importing rule: react_native_command_unrecognized; took: 0:00:00.000683
DEBUG: Importing rule: remove_trailing_cedilla; took: 0:00:00.000199
DEBUG: Importing rule: rm_dir; took: 0:00:00.000566
DEBUG: Importing rule: rm_root; took: 0:00:00.000656
DEBUG: Importing rule: scm_correction; took: 0:00:00.000526
DEBUG: Importing rule: sed_unterminated_s; took: 0:00:00.000562
DEBUG: Importing rule: sl_ls; took: 0:00:00.000172
DEBUG: Importing rule: ssh_known_hosts; took: 0:00:00.000453
DEBUG: Importing rule: sudo; took: 0:00:00.000178
DEBUG: Importing rule: sudo_command_from_user_path; took: 0:00:00.000422
DEBUG: Importing rule: switch_lang; took: 0:00:00.000197
DEBUG: Importing rule: systemctl; took: 0:00:00.000606
DEBUG: Importing rule: test.py; took: 0:00:00.000131
DEBUG: Importing rule: tmux; took: 0:00:00.000543
DEBUG: Importing rule: touch; took: 0:00:00.000490
DEBUG: Importing rule: tsuru_login; took: 0:00:00.000496
DEBUG: Importing rule: tsuru_not_command; took: 0:00:00.000644
DEBUG: Importing rule: unknown_command; took: 0:00:00.000226
DEBUG: Importing rule: unsudo; took: 0:00:00.000690
DEBUG: Importing rule: vagrant_up; took: 0:00:00.001252
DEBUG: Importing rule: whois; took: 0:00:00.001076
DEBUG: Importing rule: workon_doesnt_exists; took: 0:00:00.000568
DEBUG: Importing rule: yarn_alias; took: 0:00:00.000635
DEBUG: Importing rule: yarn_command_not_found; took: 0:00:00.001129
DEBUG: Importing rule: yarn_command_replaced; took: 0:00:00.000835
DEBUG: Importing rule: yarn_help; took: 0:00:00.000559
DEBUG: Trying rule: dirty_unzip; took: 0:00:00.000111
No fucks given
DEBUG: Total took: 0:00:00.127378
```

If the bug only appears with a specific application, the output of that application and its version:

    N/A

Anything else you think is relevant:

    N/A

<!-- It's only with enough information that we can do something to fix the problem. -->