1# The Fuck [![Version][version-badge]][version-link] [![Build Status][workflow-badge]][workflow-link] [![Coverage][coverage-badge]][coverage-link] [![MIT License][license-badge]](LICENSE.md) 2 3*The Fuck* is a magnificent app, inspired by a [@liamosaur](https://twitter.com/liamosaur/) 4[tweet](https://twitter.com/liamosaur/status/506975850596536320), 5that corrects errors in previous console commands. 6 7 8Is *The Fuck* too slow? [Try the experimental instant mode!](#experimental-instant-mode) 9 10[![gif with examples][examples-link]][examples-link] 11 12More examples: 13 14```bash 15➜ apt-get install vim 16E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) 17E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? 18 19➜ fuck 20sudo apt-get install vim [enter/↑/↓/ctrl+c] 21[sudo] password for nvbn: 22Reading package lists... Done 23... 24``` 25 26```bash 27➜ git push 28fatal: The current branch master has no upstream branch. 29To push the current branch and set the remote as upstream, use 30 31 git push --set-upstream origin master 32 33 34➜ fuck 35git push --set-upstream origin master [enter/↑/↓/ctrl+c] 36Counting objects: 9, done. 37... 38``` 39 40```bash 41➜ puthon 42No command 'puthon' found, did you mean: 43 Command 'python' from package 'python-minimal' (main) 44 Command 'python' from package 'python3' (main) 45zsh: command not found: puthon 46 47➜ fuck 48python [enter/↑/↓/ctrl+c] 49Python 3.4.2 (default, Oct 8 2014, 13:08:17) 50... 51``` 52 53```bash 54➜ git brnch 55git: 'brnch' is not a git command. See 'git --help'. 56 57Did you mean this? 58 branch 59 60➜ fuck 61git branch [enter/↑/↓/ctrl+c] 62* master 63``` 64 65```bash 66➜ lein rpl 67'rpl' is not a task. See 'lein help'. 68 69Did you mean this? 70 repl 71 72➜ fuck 73lein repl [enter/↑/↓/ctrl+c] 74nREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848 75REPL-y 0.3.1 76... 77``` 78 79If you're not afraid of blindly running corrected commands, the 80`require_confirmation` [settings](#settings) option can be disabled: 81 82```bash 83➜ apt-get install vim 84E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) 85E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? 86 87➜ fuck 88sudo apt-get install vim 89[sudo] password for nvbn: 90Reading package lists... Done 91... 92``` 93 94## Contents 95 961. [Requirements](#requirements) 972. [Installations](#installation) 983. [Updating](#updating) 994. [How it works](#how-it-works) 1005. [Creating your own rules](#creating-your-own-rules) 1016. [Settings](#settings) 1027. [Third party packages with rules](#third-party-packages-with-rules) 1038. [Experimental instant mode](#experimental-instant-mode) 1049. [Developing](#developing) 10510. [License](#license-mit) 106 107## Requirements 108 109- python (3.4+) 110- pip 111- python-dev 112 113##### [Back to Contents](#contents) 114 115## Installation 116 117On OS X, you can install *The Fuck* via [Homebrew][homebrew] (or via [Linuxbrew][linuxbrew] on Linux): 118 119```bash 120brew install thefuck 121``` 122 123On Ubuntu / Mint, install *The Fuck* with the following commands: 124```bash 125sudo apt update 126sudo apt install python3-dev python3-pip python3-setuptools 127sudo pip3 install thefuck 128``` 129 130On FreeBSD, install *The Fuck* with the following commands: 131```bash 132pkg install thefuck 133``` 134 135On ChromeOS, install *The Fuck* using [chromebrew](https://github.com/skycocker/chromebrew) with the following command: 136```bash 137crew install thefuck 138``` 139 140On other systems, install *The Fuck* by using `pip`: 141 142```bash 143pip install thefuck 144``` 145 146[Alternatively, you may use an OS package manager (OS X, Ubuntu, Arch).](https://github.com/nvbn/thefuck/wiki/Installation) 147 148<a href='#manual-installation' name='manual-installation'>#</a> 149It is recommended that you place this command in your `.bash_profile`, 150`.bashrc`, `.zshrc` or other startup script: 151 152```bash 153eval $(thefuck --alias) 154# You can use whatever you want as an alias, like for Mondays: 155eval $(thefuck --alias FUCK) 156``` 157 158[Or in your shell config (Bash, Zsh, Fish, Powershell, tcsh).](https://github.com/nvbn/thefuck/wiki/Shell-aliases) 159 160Changes are only available in a new shell session. To make changes immediately 161available, run `source ~/.bashrc` (or your shell config file like `.zshrc`). 162 163To run fixed commands without confirmation, use the `--yeah` option (or just `-y` for short, or `--hard` if you're especially frustrated): 164 165```bash 166fuck --yeah 167``` 168 169To fix commands recursively until succeeding, use the `-r` option: 170 171```bash 172fuck -r 173``` 174 175##### [Back to Contents](#contents) 176 177## Updating 178 179```bash 180pip3 install thefuck --upgrade 181``` 182 183**Note: Alias functionality was changed in v1.34 of *The Fuck*** 184 185## How it works 186 187*The Fuck* attempts to match the previous command with a rule. If a match is 188found, a new command is created using the matched rule and executed. The 189following rules are enabled by default: 190 191* `adb_unknown_command` – fixes misspelled commands like `adb logcta`; 192* `ag_literal` – adds `-Q` to `ag` when suggested; 193* `aws_cli` – fixes misspelled commands like `aws dynamdb scan`; 194* `az_cli` – fixes misspelled commands like `az providers`; 195* `cargo` – runs `cargo build` instead of `cargo`; 196* `cargo_no_command` – fixes wrongs commands like `cargo buid`; 197* `cat_dir` – replaces `cat` with `ls` when you try to `cat` a directory; 198* `cd_correction` – spellchecks and correct failed cd commands; 199* `cd_cs` – changes `cs` to `cd`; 200* `cd_mkdir` – creates directories before cd'ing into them; 201* `cd_parent` – changes `cd..` to `cd ..`; 202* `chmod_x` – add execution bit; 203* `choco_install` – append common suffixes for chocolatey packages; 204* `composer_not_command` – fixes composer command name; 205* `conda_mistype` – fixes conda commands; 206* `cp_create_destination` – creates a new directory when you attempt to `cp` or `mv` to a non existent one 207* `cp_omitting_directory` – adds `-a` when you `cp` directory; 208* `cpp11` – adds missing `-std=c++11` to `g++` or `clang++`; 209* `dirty_untar` – fixes `tar x` command that untarred in the current directory; 210* `dirty_unzip` – fixes `unzip` command that unzipped in the current directory; 211* `django_south_ghost` – adds `--delete-ghost-migrations` to failed because ghosts django south migration; 212* `django_south_merge` – adds `--merge` to inconsistent django south migration; 213* `docker_login` – executes a `docker login` and repeats the previous command; 214* `docker_not_command` – fixes wrong docker commands like `docker tags`; 215* `docker_image_being_used_by_container` ‐ removes the container that is using the image before removing the image; 216* `dry` – fixes repetitions like `git git push`; 217* `fab_command_not_found` – fix misspelled fabric commands; 218* `fix_alt_space` – replaces Alt+Space with Space character; 219* `fix_file` – opens a file with an error in your `$EDITOR`; 220* `gem_unknown_command` – fixes wrong `gem` commands; 221* `git_add` – fixes *"pathspec 'foo' did not match any file(s) known to git."*; 222* `git_add_force` – adds `--force` to `git add <pathspec>...` when paths are .gitignore'd; 223* `git_bisect_usage` – fixes `git bisect strt`, `git bisect goood`, `git bisect rset`, etc. when bisecting; 224* `git_branch_delete` – changes `git branch -d` to `git branch -D`; 225* `git_branch_delete_checked_out` – changes `git branch -d` to `git checkout master && git branch -D` when trying to delete a checked out branch; 226* `git_branch_exists` – offers `git branch -d foo`, `git branch -D foo` or `git checkout foo` when creating a branch that already exists; 227* `git_branch_list` – catches `git branch list` in place of `git branch` and removes created branch; 228* `git_checkout` – fixes branch name or creates new branch; 229* `git_clone_git_clone` – replaces `git clone git clone ...` with `git clone ...` 230* `git_commit_amend` – offers `git commit --amend` after previous commit; 231* `git_commit_reset` – offers `git reset HEAD~` after previous commit; 232* `git_diff_no_index` – adds `--no-index` to previous `git diff` on untracked files; 233* `git_diff_staged` – adds `--staged` to previous `git diff` with unexpected output; 234* `git_fix_stash` – fixes `git stash` commands (misspelled subcommand and missing `save`); 235* `git_flag_after_filename` – fixes `fatal: bad flag '...' after filename` 236* `git_help_aliased` – fixes `git help <alias>` commands replacing <alias> with the aliased command; 237* `git_hook_bypass` – adds `--no-verify` flag previous to `git am`, `git commit`, or `git push` command; 238* `git_lfs_mistype` – fixes mistyped `git lfs <command>` commands; 239* `git_merge` – adds remote to branch names; 240* `git_merge_unrelated` – adds `--allow-unrelated-histories` when required 241* `git_not_command` – fixes wrong git commands like `git brnch`; 242* `git_pull` – sets upstream before executing previous `git pull`; 243* `git_pull_clone` – clones instead of pulling when the repo does not exist; 244* `git_pull_uncommitted_changes` – stashes changes before pulling and pops them afterwards; 245* `git_push` – adds `--set-upstream origin $branch` to previous failed `git push`; 246* `git_push_different_branch_names` – fixes pushes when local brach name does not match remote branch name; 247* `git_push_pull` – runs `git pull` when `push` was rejected; 248* `git_push_without_commits` – Creates an initial commit if you forget and only `git add .`, when setting up a new project; 249* `git_rebase_no_changes` – runs `git rebase --skip` instead of `git rebase --continue` when there are no changes; 250* `git_remote_delete` – replaces `git remote delete remote_name` with `git remote remove remote_name`; 251* `git_rm_local_modifications` – adds `-f` or `--cached` when you try to `rm` a locally modified file; 252* `git_rm_recursive` – adds `-r` when you try to `rm` a directory; 253* `git_rm_staged` – adds `-f` or `--cached` when you try to `rm` a file with staged changes 254* `git_rebase_merge_dir` – offers `git rebase (--continue | --abort | --skip)` or removing the `.git/rebase-merge` dir when a rebase is in progress; 255* `git_remote_seturl_add` – runs `git remote add` when `git remote set_url` on nonexistent remote; 256* `git_stash` – stashes your local modifications before rebasing or switching branch; 257* `git_stash_pop` – adds your local modifications before popping stash, then resets; 258* `git_tag_force` – adds `--force` to `git tag <tagname>` when the tag already exists; 259* `git_two_dashes` – adds a missing dash to commands like `git commit -amend` or `git rebase -continue`; 260* `go_run` – appends `.go` extension when compiling/running Go programs; 261* `go_unknown_command` – fixes wrong `go` commands, for example `go bulid`; 262* `gradle_no_task` – fixes not found or ambiguous `gradle` task; 263* `gradle_wrapper` – replaces `gradle` with `./gradlew`; 264* `grep_arguments_order` – fixes `grep` arguments order for situations like `grep -lir . test`; 265* `grep_recursive` – adds `-r` when you try to `grep` directory; 266* `grunt_task_not_found` – fixes misspelled `grunt` commands; 267* `gulp_not_task` – fixes misspelled `gulp` tasks; 268* `has_exists_script` – prepends `./` when script/binary exists; 269* `heroku_multiple_apps` – add `--app <app>` to `heroku` commands like `heroku pg`; 270* `heroku_not_command` – fixes wrong `heroku` commands like `heroku log`; 271* `history` – tries to replace command with most similar command from history; 272* `hostscli` – tries to fix `hostscli` usage; 273* `ifconfig_device_not_found` – fixes wrong device names like `wlan0` to `wlp2s0`; 274* `java` – removes `.java` extension when running Java programs; 275* `javac` – appends missing `.java` when compiling Java files; 276* `lein_not_task` – fixes wrong `lein` tasks like `lein rpl`; 277* `long_form_help` – changes `-h` to `--help` when the short form version is not supported 278* `ln_no_hard_link` – catches hard link creation on directories, suggest symbolic link; 279* `ln_s_order` – fixes `ln -s` arguments order; 280* `ls_all` – adds `-A` to `ls` when output is empty; 281* `ls_lah` – adds `-lah` to `ls`; 282* `man` – changes manual section; 283* `man_no_space` – fixes man commands without spaces, for example `mandiff`; 284* `mercurial` – fixes wrong `hg` commands; 285* `missing_space_before_subcommand` – fixes command with missing space like `npminstall`; 286* `mkdir_p` – adds `-p` when you try to create a directory without parent; 287* `mvn_no_command` – adds `clean package` to `mvn`; 288* `mvn_unknown_lifecycle_phase` – fixes misspelled life cycle phases with `mvn`; 289* `npm_missing_script` – fixes `npm` custom script name in `npm run-script <script>`; 290* `npm_run_script` – adds missing `run-script` for custom `npm` scripts; 291* `npm_wrong_command` – fixes wrong npm commands like `npm urgrade`; 292* `no_command` – fixes wrong console commands, for example `vom/vim`; 293* `no_such_file` – creates missing directories with `mv` and `cp` commands; 294* `omnienv_no_such_command` – fixes wrong commands for `goenv`, `nodenv`, `pyenv` and `rbenv` (eg.: `pyenv isntall` or `goenv list`); 295* `open` – either prepends `http://` to address passed to `open` or create a new file or directory and passes it to `open`; 296* `pip_install` – fixes permission issues with `pip install` commands by adding `--user` or prepending `sudo` if necessary; 297* `pip_unknown_command` – fixes wrong `pip` commands, for example `pip instatl/pip install`; 298* `php_s` – replaces `-s` by `-S` when trying to run a local php server; 299* `port_already_in_use` – kills process that bound port; 300* `prove_recursively` – adds `-r` when called with directory; 301* `python_command` – prepends `python` when you try to run non-executable/without `./` python script; 302* `python_execute` – appends missing `.py` when executing Python files; 303* `python_module_error` – fixes ModuleNotFoundError by trying to `pip install` that module; 304* `quotation_marks` – fixes uneven usage of `'` and `"` when containing args'; 305* `path_from_history` – replaces not found path with similar absolute path from history; 306* `react_native_command_unrecognized` – fixes unrecognized `react-native` commands; 307* `remove_shell_prompt_literal` – remove leading shell prompt symbol `$`, common when copying commands from documentations; 308* `remove_trailing_cedilla` – remove trailing cedillas `ç`, a common typo for european keyboard layouts; 309* `rm_dir` – adds `-rf` when you try to remove a directory; 310* `scm_correction` – corrects wrong scm like `hg log` to `git log`; 311* `sed_unterminated_s` – adds missing '/' to `sed`'s `s` commands; 312* `sl_ls` – changes `sl` to `ls`; 313* `ssh_known_hosts` – removes host from `known_hosts` on warning; 314* `sudo` – prepends `sudo` to previous command if it failed because of permissions; 315* `sudo_command_from_user_path` – runs commands from users `$PATH` with `sudo`; 316* `switch_lang` – switches command from your local layout to en; 317* `systemctl` – correctly orders parameters of confusing `systemctl`; 318* `terraform_init.py` – run `terraform init` before plan or apply; 319* `test.py` – runs `py.test` instead of `test.py`; 320* `touch` – creates missing directories before "touching"; 321* `tsuru_login` – runs `tsuru login` if not authenticated or session expired; 322* `tsuru_not_command` – fixes wrong `tsuru` commands like `tsuru shell`; 323* `tmux` – fixes `tmux` commands; 324* `unknown_command` – fixes hadoop hdfs-style "unknown command", for example adds missing '-' to the command on `hdfs dfs ls`; 325* `unsudo` – removes `sudo` from previous command if a process refuses to run on super user privilege. 326* `vagrant_up` – starts up the vagrant instance; 327* `whois` – fixes `whois` command; 328* `workon_doesnt_exists` – fixes `virtualenvwrapper` env name os suggests to create new. 329* `yarn_alias` – fixes aliased `yarn` commands like `yarn ls`; 330* `yarn_command_not_found` – fixes misspelled `yarn` commands; 331* `yarn_command_replaced` – fixes replaced `yarn` commands; 332* `yarn_help` – makes it easier to open `yarn` documentation; 333 334##### [Back to Contents](#contents) 335 336The following rules are enabled by default on specific platforms only: 337 338* `apt_get` – installs app from apt if it not installed (requires `python-commandnotfound` / `python3-commandnotfound`); 339* `apt_get_search` – changes trying to search using `apt-get` with searching using `apt-cache`; 340* `apt_invalid_operation` – fixes invalid `apt` and `apt-get` calls, like `apt-get isntall vim`; 341* `apt_list_upgradable` – helps you run `apt list --upgradable` after `apt update`; 342* `apt_upgrade` – helps you run `apt upgrade` after `apt list --upgradable`; 343* `brew_cask_dependency` – installs cask dependencies; 344* `brew_install` – fixes formula name for `brew install`; 345* `brew_reinstall` – turns `brew install <formula>` into `brew reinstall <formula>`; 346* `brew_link` – adds `--overwrite --dry-run` if linking fails; 347* `brew_uninstall` – adds `--force` to `brew uninstall` if multiple versions were installed; 348* `brew_unknown_command` – fixes wrong brew commands, for example `brew docto/brew doctor`; 349* `brew_update_formula` – turns `brew update <formula>` into `brew upgrade <formula>`; 350* `dnf_no_such_command` – fixes mistyped DNF commands; 351* `nixos_cmd_not_found` – installs apps on NixOS; 352* `pacman` – installs app with `pacman` if it is not installed (uses `yay` or `yaourt` if available); 353* `pacman_invalid_option` – replaces lowercase `pacman` options with uppercase. 354* `pacman_not_found` – fixes package name with `pacman`, `yay` or `yaourt`. 355* `yum_invalid_operation` – fixes invalid `yum` calls, like `yum isntall vim`; 356 357The following commands are bundled with *The Fuck*, but are not enabled by 358default: 359 360* `git_push_force` – adds `--force-with-lease` to a `git push` (may conflict with `git_push_pull`); 361* `rm_root` – adds `--no-preserve-root` to `rm -rf /` command. 362 363##### [Back to Contents](#contents) 364 365## Creating your own rules 366 367To add your own rule, create a file named `your-rule-name.py` 368in `~/.config/thefuck/rules`. The rule file must contain two functions: 369 370```python 371match(command: Command) -> bool 372get_new_command(command: Command) -> str | list[str] 373``` 374 375Additionally, rules can contain optional functions: 376 377```python 378side_effect(old_command: Command, fixed_command: str) -> None 379``` 380Rules can also contain the optional variables `enabled_by_default`, `requires_output` and `priority`. 381 382`Command` has three attributes: `script`, `output` and `script_parts`. 383Your rule should not change `Command`. 384 385 386**Rules api changed in 3.0:** To access a rule's settings, import it with 387 `from thefuck.conf import settings` 388 389`settings` is a special object assembled from `~/.config/thefuck/settings.py`, 390and values from env ([see more below](#settings)). 391 392A simple example rule for running a script with `sudo`: 393 394```python 395def match(command): 396 return ('permission denied' in command.output.lower() 397 or 'EACCES' in command.output) 398 399 400def get_new_command(command): 401 return 'sudo {}'.format(command.script) 402 403# Optional: 404enabled_by_default = True 405 406def side_effect(command, fixed_command): 407 subprocess.call('chmod 777 .', shell=True) 408 409priority = 1000 # Lower first, default is 1000 410 411requires_output = True 412``` 413 414[More examples of rules](https://github.com/nvbn/thefuck/tree/master/thefuck/rules), 415[utility functions for rules](https://github.com/nvbn/thefuck/tree/master/thefuck/utils.py), 416[app/os-specific helpers](https://github.com/nvbn/thefuck/tree/master/thefuck/specific/). 417 418##### [Back to Contents](#contents) 419 420## Settings 421 422Several *The Fuck* parameters can be changed in the file `$XDG_CONFIG_HOME/thefuck/settings.py` 423(`$XDG_CONFIG_HOME` defaults to `~/.config`): 424 425* `rules` – list of enabled rules, by default `thefuck.const.DEFAULT_RULES`; 426* `exclude_rules` – list of disabled rules, by default `[]`; 427* `require_confirmation` – requires confirmation before running new command, by default `True`; 428* `wait_command` – max amount of time in seconds for getting previous command output; 429* `no_colors` – disable colored output; 430* `priority` – dict with rules priorities, rule with lower `priority` will be matched first; 431* `debug` – enables debug output, by default `False`; 432* `history_limit` – numeric value of how many history commands will be scanned, like `2000`; 433* `alter_history` – push fixed command to history, by default `True`; 434* `wait_slow_command` – max amount of time in seconds for getting previous command output if it in `slow_commands` list; 435* `slow_commands` – list of slow commands; 436* `num_close_matches` – maximum number of close matches to suggest, by default `3`. 437* `excluded_search_path_prefixes` – path prefixes to ignore when searching for commands, by default `[]`. 438 439An example of `settings.py`: 440 441```python 442rules = ['sudo', 'no_command'] 443exclude_rules = ['git_push'] 444require_confirmation = True 445wait_command = 10 446no_colors = False 447priority = {'sudo': 100, 'no_command': 9999} 448debug = False 449history_limit = 9999 450wait_slow_command = 20 451slow_commands = ['react-native', 'gradle'] 452num_close_matches = 5 453``` 454 455Or via environment variables: 456 457* `THEFUCK_RULES` – list of enabled rules, like `DEFAULT_RULES:rm_root` or `sudo:no_command`; 458* `THEFUCK_EXCLUDE_RULES` – list of disabled rules, like `git_pull:git_push`; 459* `THEFUCK_REQUIRE_CONFIRMATION` – require confirmation before running new command, `true/false`; 460* `THEFUCK_WAIT_COMMAND` – max amount of time in seconds for getting previous command output; 461* `THEFUCK_NO_COLORS` – disable colored output, `true/false`; 462* `THEFUCK_PRIORITY` – priority of the rules, like `no_command=9999:apt_get=100`, 463rule with lower `priority` will be matched first; 464* `THEFUCK_DEBUG` – enables debug output, `true/false`; 465* `THEFUCK_HISTORY_LIMIT` – how many history commands will be scanned, like `2000`; 466* `THEFUCK_ALTER_HISTORY` – push fixed command to history `true/false`; 467* `THEFUCK_WAIT_SLOW_COMMAND` – max amount of time in seconds for getting previous command output if it in `slow_commands` list; 468* `THEFUCK_SLOW_COMMANDS` – list of slow commands, like `lein:gradle`; 469* `THEFUCK_NUM_CLOSE_MATCHES` – maximum number of close matches to suggest, like `5`. 470* `THEFUCK_EXCLUDED_SEARCH_PATH_PREFIXES` – path prefixes to ignore when searching for commands, by default `[]`. 471 472For example: 473 474```bash 475export THEFUCK_RULES='sudo:no_command' 476export THEFUCK_EXCLUDE_RULES='git_pull:git_push' 477export THEFUCK_REQUIRE_CONFIRMATION='true' 478export THEFUCK_WAIT_COMMAND=10 479export THEFUCK_NO_COLORS='false' 480export THEFUCK_PRIORITY='no_command=9999:apt_get=100' 481export THEFUCK_HISTORY_LIMIT='2000' 482export THEFUCK_NUM_CLOSE_MATCHES='5' 483``` 484 485##### [Back to Contents](#contents) 486 487## Third-party packages with rules 488 489If you'd like to make a specific set of non-public rules, but would still like 490to share them with others, create a package named `thefuck_contrib_*` with 491the following structure: 492 493``` 494thefuck_contrib_foo 495 thefuck_contrib_foo 496 rules 497 __init__.py 498 *third-party rules* 499 __init__.py 500 *third-party-utils* 501 setup.py 502``` 503 504*The Fuck* will find rules located in the `rules` module. 505 506##### [Back to Contents](#contents) 507 508## Experimental instant mode 509 510The default behavior of *The Fuck* requires time to re-run previous commands. 511When in instant mode, *The Fuck* saves time by logging output with [script](https://en.wikipedia.org/wiki/Script_(Unix)), 512then reading the log. 513 514[![gif with instant mode][instant-mode-gif-link]][instant-mode-gif-link] 515 516Currently, instant mode only supports Python 3 with bash or zsh. zsh's autocorrect function also needs to be disabled in order for thefuck to work properly. 517 518To enable instant mode, add `--enable-experimental-instant-mode` 519to the alias initialization in `.bashrc`, `.bash_profile` or `.zshrc`. 520 521For example: 522 523```bash 524eval $(thefuck --alias --enable-experimental-instant-mode) 525``` 526 527##### [Back to Contents](#contents) 528 529## Developing 530 531See [CONTRIBUTING.md](CONTRIBUTING.md) 532 533## License MIT 534Project License can be found [here](LICENSE.md). 535 536 537[version-badge]: https://img.shields.io/pypi/v/thefuck.svg?label=version 538[version-link]: https://pypi.python.org/pypi/thefuck/ 539[workflow-badge]: https://github.com/nvbn/thefuck/workflows/Tests/badge.svg 540[workflow-link]: https://github.com/nvbn/thefuck/actions?query=workflow%3ATests 541[coverage-badge]: https://img.shields.io/coveralls/nvbn/thefuck.svg 542[coverage-link]: https://coveralls.io/github/nvbn/thefuck 543[license-badge]: https://img.shields.io/badge/license-MIT-007EC7.svg 544[examples-link]: https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif 545[instant-mode-gif-link]: https://raw.githubusercontent.com/nvbn/thefuck/master/example_instant_mode.gif 546[homebrew]: https://brew.sh/ 547[linuxbrew]: https://linuxbrew.sh/ 548 549##### [Back to Contents](#contents) 550