{"id":16318117,"url":"https://github.com/scorphus/thefuck-debian","last_synced_at":"2025-05-13T17:16:07.768Z","repository":{"id":148201090,"uuid":"345761312","full_name":"scorphus/thefuck-debian","owner":"scorphus","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-08T18:54:00.000Z","size":1549,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T20:28:01.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scorphus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-08T18:51:49.000Z","updated_at":"2021-03-08T18:54:08.000Z","dependencies_parsed_at":"2023-05-19T10:30:44.251Z","dependency_job_id":null,"html_url":"https://github.com/scorphus/thefuck-debian","commit_stats":{"total_commits":48,"total_committers":5,"mean_commits":9.6,"dds":0.7083333333333333,"last_synced_commit":"557ab37645a53e514b9afd7d4f44941be717d447"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fthefuck-debian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fthefuck-debian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fthefuck-debian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scorphus%2Fthefuck-debian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scorphus","download_url":"https://codeload.github.com/scorphus/thefuck-debian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990503,"owners_count":21995776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T22:10:00.942Z","updated_at":"2025-05-13T17:16:07.743Z","avatar_url":"https://github.com/scorphus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Fuck [![Version][version-badge]][version-link] [![Build Status][travis-badge]][travis-link] [![Windows Build Status][appveyor-badge]][appveyor-link] [![Coverage][coverage-badge]][coverage-link] [![MIT License][license-badge]](LICENSE.md)\n\n*The Fuck* is a magnificent app, inspired by a [@liamosaur](https://twitter.com/liamosaur/)\n[tweet](https://twitter.com/liamosaur/status/506975850596536320),\nthat corrects errors in previous console commands.\n\n\nIs *The Fuck* too slow? [Try the experimental instant mode!](#experimental-instant-mode)\n\n[![gif with examples][examples-link]][examples-link]\n\nMore examples:\n\n```bash\n➜ apt-get install vim\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?\n\n➜ fuck\nsudo apt-get install vim [enter/↑/↓/ctrl+c]\n[sudo] password for nvbn:\nReading package lists... Done\n...\n```\n\n```bash\n➜ git push\nfatal: The current branch master has no upstream branch.\nTo push the current branch and set the remote as upstream, use\n\n    git push --set-upstream origin master\n\n\n➜ fuck\ngit push --set-upstream origin master [enter/↑/↓/ctrl+c]\nCounting objects: 9, done.\n...\n```\n\n```bash\n➜ puthon\nNo command 'puthon' found, did you mean:\n Command 'python' from package 'python-minimal' (main)\n Command 'python' from package 'python3' (main)\nzsh: command not found: puthon\n\n➜ fuck\npython [enter/↑/↓/ctrl+c]\nPython 3.4.2 (default, Oct  8 2014, 13:08:17)\n...\n```\n\n```bash\n➜ git brnch\ngit: 'brnch' is not a git command. See 'git --help'.\n\nDid you mean this?\n    branch\n\n➜ fuck\ngit branch [enter/↑/↓/ctrl+c]\n* master\n```\n\n```bash\n➜ lein rpl\n'rpl' is not a task. See 'lein help'.\n\nDid you mean this?\n         repl\n\n➜ fuck\nlein repl [enter/↑/↓/ctrl+c]\nnREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848\nREPL-y 0.3.1\n...\n```\n\nIf you're not afraid of blindly running corrected commands, the\n`require_confirmation` [settings](#settings) option can be disabled:\n\n```bash\n➜ apt-get install vim\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?\n\n➜ fuck\nsudo apt-get install vim\n[sudo] password for nvbn:\nReading package lists... Done\n...\n```\n\n## Requirements\n\n- python (3.4+)\n- pip\n- python-dev\n\n## Installation\n\nOn OS X, you can install *The Fuck* via [Homebrew][homebrew] (or via [Linuxbrew][linuxbrew] on Linux):\n\n```bash\nbrew install thefuck\n```\n\nOn Ubuntu / Mint, install *The Fuck* with the following commands:\n```bash\nsudo apt update\nsudo apt install python3-dev python3-pip python3-setuptools\nsudo pip3 install thefuck\n```\n\nOn FreeBSD, install *The Fuck* with the following commands:\n```bash\npkg install thefuck\n```\n\nOn ChromeOS, install *The Fuck* using [chromebrew](https://github.com/skycocker/chromebrew) with the following command:\n```bash\ncrew install thefuck\n```\n\nOn other systems, install *The Fuck*  by using `pip`:\n\n```bash\npip install thefuck\n```\n\n[Alternatively, you may use an OS package manager (OS X, Ubuntu, Arch).](https://github.com/nvbn/thefuck/wiki/Installation)\n\n\u003ca href='#manual-installation' name='manual-installation'\u003e#\u003c/a\u003e\nIt is recommended that you place this command in your `.bash_profile`,\n`.bashrc`, `.zshrc` or other startup script:\n\n```bash\neval $(thefuck --alias)\n# You can use whatever you want as an alias, like for Mondays:\neval $(thefuck --alias FUCK)\n```\n\n[Or in your shell config (Bash, Zsh, Fish, Powershell, tcsh).](https://github.com/nvbn/thefuck/wiki/Shell-aliases)\n\nChanges are only available in a new shell session. To make changes immediately\navailable, run `source ~/.bashrc` (or your shell config file like `.zshrc`).\n\nTo run fixed commands without confirmation, use the `--yeah` option (or just `-y` for short, or `--hard` if you're especially frustrated):\n\n```bash\nfuck --yeah\n```\n\nTo fix commands recursively until succeeding, use the `-r` option:\n\n```bash\nfuck -r\n```\n\n## Updating\n\n```bash\npip3 install thefuck --upgrade\n```\n\n**Note: Alias functionality was changed in v1.34 of *The Fuck***\n\n## How it works\n\n*The Fuck* attempts to match the previous command with a rule. If a match is\nfound, a new command is created using the matched rule and executed. The\nfollowing rules are enabled by default:\n\n* `adb_unknown_command` \u0026ndash; fixes misspelled commands like `adb logcta`;\n* `ag_literal` \u0026ndash; adds `-Q` to `ag` when suggested;\n* `aws_cli` \u0026ndash; fixes misspelled commands like `aws dynamdb scan`;\n* `az_cli` \u0026ndash; fixes misspelled commands like `az providers`;\n* `cargo` \u0026ndash; runs `cargo build` instead of `cargo`;\n* `cargo_no_command` \u0026ndash; fixes wrongs commands like `cargo buid`;\n* `cat_dir` \u0026ndash; replaces `cat` with `ls` when you try to `cat` a directory;\n* `cd_correction` \u0026ndash; spellchecks and correct failed cd commands;\n* `cd_mkdir` \u0026ndash; creates directories before cd'ing into them;\n* `cd_parent` \u0026ndash; changes `cd..` to `cd ..`;\n* `chmod_x` \u0026ndash; add execution bit;\n* `choco_install` \u0026ndash; append common suffixes for chocolatey packages;\n* `composer_not_command` \u0026ndash; fixes composer command name;\n* `cp_create_destination` \u0026ndash; creates a new directory when you attempt to `cp` or `mv` to a non existent one\n* `cp_omitting_directory` \u0026ndash; adds `-a` when you `cp` directory;\n* `cpp11` \u0026ndash; adds missing `-std=c++11` to `g++` or `clang++`;\n* `dirty_untar` \u0026ndash; fixes `tar x` command that untarred in the current directory;\n* `dirty_unzip` \u0026ndash; fixes `unzip` command that unzipped in the current directory;\n* `django_south_ghost` \u0026ndash; adds `--delete-ghost-migrations` to failed because ghosts django south migration;\n* `django_south_merge` \u0026ndash; adds `--merge` to inconsistent django south migration;\n* `docker_login` \u0026ndash; executes a `docker login` and repeats the previous command;\n* `docker_not_command` \u0026ndash; fixes wrong docker commands like `docker tags`;\n* `docker_image_being_used_by_container` \u0026dash; removes the container that is using the image before removing the image;\n* `dry` \u0026ndash; fixes repetitions like `git git push`;\n* `fab_command_not_found` \u0026ndash; fix misspelled fabric commands;\n* `fix_alt_space` \u0026ndash; replaces Alt+Space with Space character;\n* `fix_file` \u0026ndash; opens a file with an error in your `$EDITOR`;\n* `gem_unknown_command` \u0026ndash; fixes wrong `gem` commands;\n* `git_add` \u0026ndash; fixes *\"pathspec 'foo' did not match any file(s) known to git.\"*;\n* `git_add_force` \u0026ndash; adds `--force` to `git add \u003cpathspec\u003e...` when paths are .gitignore'd;\n* `git_bisect_usage` \u0026ndash; fixes `git bisect strt`, `git bisect goood`, `git bisect rset`, etc. when bisecting;\n* `git_branch_delete` \u0026ndash; changes `git branch -d` to `git branch -D`;\n* `git_branch_delete_checked_out` \u0026ndash; changes `git branch -d` to `git checkout master \u0026\u0026 git branch -D` when trying to delete a checked out branch;\n* `git_branch_exists` \u0026ndash; offers `git branch -d foo`, `git branch -D foo` or `git checkout foo` when creating a branch that already exists;\n* `git_branch_list` \u0026ndash; catches `git branch list` in place of `git branch` and removes created branch;\n* `git_checkout` \u0026ndash; fixes branch name or creates new branch;\n* `git_commit_amend` \u0026ndash; offers `git commit --amend` after previous commit;\n* `git_commit_reset` \u0026ndash; offers `git reset HEAD~` after previous commit;\n* `git_diff_no_index` \u0026ndash; adds `--no-index` to previous `git diff` on untracked files;\n* `git_diff_staged` \u0026ndash; adds `--staged` to previous `git diff` with unexpected output;\n* `git_fix_stash` \u0026ndash; fixes `git stash` commands (misspelled subcommand and missing `save`);\n* `git_flag_after_filename` \u0026ndash; fixes `fatal: bad flag '...' after filename`\n* `git_help_aliased` \u0026ndash; fixes `git help \u003calias\u003e` commands replacing \u003calias\u003e with the aliased command;\n* `git_merge` \u0026ndash; adds remote to branch names;\n* `git_merge_unrelated` \u0026ndash; adds `--allow-unrelated-histories` when required\n* `git_not_command` \u0026ndash; fixes wrong git commands like `git brnch`;\n* `git_pull` \u0026ndash; sets upstream before executing previous `git pull`;\n* `git_pull_clone` \u0026ndash; clones instead of pulling when the repo does not exist;\n* `git_pull_uncommitted_changes` \u0026ndash; stashes changes before pulling and pops them afterwards;\n* `git_push` \u0026ndash; adds `--set-upstream origin $branch` to previous failed `git push`;\n* `git_push_different_branch_names` \u0026ndash; fixes pushes when local brach name does not match remote branch name;\n* `git_push_pull` \u0026ndash; runs `git pull` when `push` was rejected;\n* `git_push_without_commits` \u0026ndash; Creates an initial commit if you forget and only `git add .`, when setting up a new project;\n* `git_rebase_no_changes` \u0026ndash; runs `git rebase --skip` instead of `git rebase --continue` when there are no changes;\n* `git_remote_delete` \u0026ndash; replaces `git remote delete remote_name` with `git remote remove remote_name`;\n* `git_rm_local_modifications` \u0026ndash;  adds `-f` or `--cached` when you try to `rm` a locally modified file;\n* `git_rm_recursive` \u0026ndash; adds `-r` when you try to `rm` a directory;\n* `git_rm_staged` \u0026ndash;  adds `-f` or `--cached` when you try to `rm` a file with staged changes\n* `git_rebase_merge_dir` \u0026ndash; offers `git rebase (--continue | --abort | --skip)` or removing the `.git/rebase-merge` dir when a rebase is in progress;\n* `git_remote_seturl_add` \u0026ndash; runs `git remote add` when `git remote set_url` on nonexistent remote;\n* `git_stash` \u0026ndash; stashes your local modifications before rebasing or switching branch;\n* `git_stash_pop` \u0026ndash; adds your local modifications before popping stash, then resets;\n* `git_tag_force` \u0026ndash; adds `--force` to `git tag \u003ctagname\u003e` when the tag already exists;\n* `git_two_dashes` \u0026ndash; adds a missing dash to commands like `git commit -amend` or `git rebase -continue`;\n* `go_run` \u0026ndash; appends `.go` extension when compiling/running Go programs;\n* `go_unknown_command` \u0026ndash; fixes wrong `go` commands, for example `go bulid`;\n* `gradle_no_task` \u0026ndash; fixes not found or ambiguous `gradle` task;\n* `gradle_wrapper` \u0026ndash; replaces `gradle` with `./gradlew`;\n* `grep_arguments_order` \u0026ndash; fixes `grep` arguments order for situations like `grep -lir . test`;\n* `grep_recursive` \u0026ndash; adds `-r` when you try to `grep` directory;\n* `grunt_task_not_found` \u0026ndash; fixes misspelled `grunt` commands;\n* `gulp_not_task` \u0026ndash; fixes misspelled `gulp` tasks;\n* `has_exists_script` \u0026ndash; prepends `./` when script/binary exists;\n* `heroku_multiple_apps` \u0026ndash; add `--app \u003capp\u003e` to `heroku` commands like `heroku pg`;\n* `heroku_not_command` \u0026ndash; fixes wrong `heroku` commands like `heroku log`;\n* `history` \u0026ndash; tries to replace command with most similar command from history;\n* `hostscli` \u0026ndash; tries to fix `hostscli` usage;\n* `ifconfig_device_not_found` \u0026ndash; fixes wrong device names like `wlan0` to `wlp2s0`;\n* `java` \u0026ndash; removes `.java` extension when running Java programs;\n* `javac` \u0026ndash; appends missing `.java` when compiling Java files;\n* `lein_not_task` \u0026ndash; fixes wrong `lein` tasks like `lein rpl`;\n* `long_form_help` \u0026ndash; changes `-h` to `--help` when the short form version is not supported\n* `ln_no_hard_link` \u0026ndash; catches hard link creation on directories, suggest symbolic link;\n* `ln_s_order` \u0026ndash; fixes `ln -s` arguments order;\n* `ls_all` \u0026ndash; adds `-A` to `ls` when output is empty;\n* `ls_lah` \u0026ndash; adds `-lah` to `ls`;\n* `man` \u0026ndash; changes manual section;\n* `man_no_space` \u0026ndash; fixes man commands without spaces, for example `mandiff`;\n* `mercurial` \u0026ndash; fixes wrong `hg` commands;\n* `missing_space_before_subcommand` \u0026ndash; fixes command with missing space like `npminstall`;\n* `mkdir_p` \u0026ndash; adds `-p` when you try to create a directory without parent;\n* `mvn_no_command` \u0026ndash; adds `clean package` to `mvn`;\n* `mvn_unknown_lifecycle_phase` \u0026ndash; fixes misspelled life cycle phases with `mvn`;\n* `npm_missing_script` \u0026ndash; fixes `npm` custom script name in `npm run-script \u003cscript\u003e`;\n* `npm_run_script` \u0026ndash; adds missing `run-script` for custom `npm` scripts;\n* `npm_wrong_command` \u0026ndash; fixes wrong npm commands like `npm urgrade`;\n* `no_command` \u0026ndash; fixes wrong console commands, for example `vom/vim`;\n* `no_such_file` \u0026ndash; creates missing directories with `mv` and `cp` commands;\n* `open` \u0026ndash; either prepends `http://` to address passed to `open` or create a new file or directory and passes it to `open`;\n* `pip_install` \u0026ndash; fixes permission issues with `pip install` commands by adding `--user` or prepending `sudo` if necessary;\n* `pip_unknown_command` \u0026ndash; fixes wrong `pip` commands, for example `pip instatl/pip install`;\n* `php_s` \u0026ndash; replaces `-s` by `-S` when trying to run a local php server;\n* `port_already_in_use` \u0026ndash; kills process that bound port;\n* `prove_recursively` \u0026ndash; adds `-r` when called with directory;\n* `pyenv_no_such_command` \u0026ndash; fixes wrong pyenv commands like `pyenv isntall` or `pyenv list`;\n* `python_command` \u0026ndash; prepends `python` when you try to run non-executable/without `./` python script;\n* `python_execute` \u0026ndash; appends missing `.py` when executing Python files;\n* `quotation_marks` \u0026ndash; fixes uneven usage of `'` and `\"` when containing args';\n* `path_from_history` \u0026ndash; replaces not found path with similar absolute path from history;\n* `react_native_command_unrecognized` \u0026ndash; fixes unrecognized `react-native` commands;\n* `remove_shell_prompt_literal` \u0026ndash; remove leading shell prompt symbol `$`, common when copying commands from documentations;\n* `remove_trailing_cedilla` \u0026ndash; remove trailing cedillas `ç`, a common typo for european keyboard layouts;\n* `rm_dir` \u0026ndash; adds `-rf` when you try to remove a directory;\n* `scm_correction` \u0026ndash; corrects wrong scm like `hg log` to `git log`;\n* `sed_unterminated_s` \u0026ndash; adds missing '/' to `sed`'s `s` commands;\n* `sl_ls` \u0026ndash; changes `sl` to `ls`;\n* `ssh_known_hosts` \u0026ndash; removes host from `known_hosts` on warning;\n* `sudo` \u0026ndash; prepends `sudo` to previous command if it failed because of permissions;\n* `sudo_command_from_user_path` \u0026ndash; runs commands from users `$PATH` with `sudo`;\n* `switch_lang` \u0026ndash; switches command from your local layout to en;\n* `systemctl` \u0026ndash; correctly orders parameters of confusing `systemctl`;\n* `terraform_init.py` \u0026ndash; run `terraform init` before plan or apply;\n* `test.py` \u0026ndash; runs `py.test` instead of `test.py`;\n* `touch` \u0026ndash; creates missing directories before \"touching\";\n* `tsuru_login` \u0026ndash; runs `tsuru login` if not authenticated or session expired;\n* `tsuru_not_command` \u0026ndash; fixes wrong `tsuru` commands like `tsuru shell`;\n* `tmux` \u0026ndash; fixes `tmux` commands;\n* `unknown_command` \u0026ndash; fixes hadoop hdfs-style \"unknown command\", for example adds missing '-' to the command on `hdfs dfs ls`;\n* `unsudo` \u0026ndash; removes `sudo` from previous command if a process refuses to run on super user privilege.\n* `vagrant_up` \u0026ndash; starts up the vagrant instance;\n* `whois` \u0026ndash; fixes `whois` command;\n* `workon_doesnt_exists` \u0026ndash; fixes `virtualenvwrapper` env name os suggests to create new.\n* `yarn_alias` \u0026ndash; fixes aliased `yarn` commands like `yarn ls`;\n* `yarn_command_not_found` \u0026ndash; fixes misspelled `yarn` commands;\n* `yarn_command_replaced` \u0026ndash; fixes replaced `yarn` commands;\n* `yarn_help` \u0026ndash; makes it easier to open `yarn` documentation;\n\nThe following rules are enabled by default on specific platforms only:\n\n* `apt_get` \u0026ndash; installs app from apt if it not installed (requires `python-commandnotfound` / `python3-commandnotfound`);\n* `apt_get_search` \u0026ndash; changes trying to search using `apt-get` with searching using `apt-cache`;\n* `apt_invalid_operation` \u0026ndash; fixes invalid `apt` and `apt-get` calls, like `apt-get isntall vim`;\n* `apt_list_upgradable` \u0026ndash; helps you run `apt list --upgradable` after `apt update`;\n* `apt_upgrade` \u0026ndash; helps you run `apt upgrade` after `apt list --upgradable`;\n* `brew_cask_dependency` \u0026ndash; installs cask dependencies;\n* `brew_install` \u0026ndash; fixes formula name for `brew install`;\n* `brew_reinstall` \u0026ndash; turns `brew install \u003cformula\u003e` into `brew reinstall \u003cformula\u003e`;\n* `brew_link` \u0026ndash; adds `--overwrite --dry-run` if linking fails;\n* `brew_uninstall` \u0026ndash; adds `--force` to `brew uninstall` if multiple versions were installed;\n* `brew_unknown_command` \u0026ndash; fixes wrong brew commands, for example `brew docto/brew doctor`;\n* `brew_update_formula` \u0026ndash; turns `brew update \u003cformula\u003e` into `brew upgrade \u003cformula\u003e`;\n* `dnf_no_such_command` \u0026ndash; fixes mistyped DNF commands;\n* `nixos_cmd_not_found` \u0026ndash; installs apps on NixOS;\n* `pacman` \u0026ndash; installs app with `pacman` if it is not installed (uses `yay` or `yaourt` if available);\n* `pacman_not_found` \u0026ndash; fixes package name with `pacman`, `yay` or `yaourt`.\n* `yum_invalid_operation` \u0026ndash; fixes invalid `yum` calls, like `yum isntall vim`;\n\nThe following commands are bundled with *The Fuck*, but are not enabled by\ndefault:\n\n* `git_push_force` \u0026ndash; adds `--force-with-lease` to a `git push` (may conflict with `git_push_pull`);\n* `rm_root` \u0026ndash; adds `--no-preserve-root` to `rm -rf /` command.\n\n## Creating your own rules\n\nTo add your own rule, create a file named `your-rule-name.py`\nin `~/.config/thefuck/rules`. The rule file must contain two functions:\n\n```python\nmatch(command: Command) -\u003e bool\nget_new_command(command: Command) -\u003e str | list[str]\n```\n\nAdditionally, rules can contain optional functions:\n\n```python\nside_effect(old_command: Command, fixed_command: str) -\u003e None\n```\nRules can also contain the optional variables `enabled_by_default`, `requires_output` and `priority`.\n\n`Command` has three attributes: `script`, `output` and `script_parts`.\nYour rule should not change `Command`.\n\n\n**Rules api changed in 3.0:** To access a rule's settings, import it with\n `from thefuck.conf import settings`\n\n`settings` is a special object assembled from `~/.config/thefuck/settings.py`,\nand values from env ([see more below](#settings)).\n\nA simple example rule for running a script with `sudo`:\n\n```python\ndef match(command):\n    return ('permission denied' in command.output.lower()\n            or 'EACCES' in command.output)\n\n\ndef get_new_command(command):\n    return 'sudo {}'.format(command.script)\n\n# Optional:\nenabled_by_default = True\n\ndef side_effect(command, fixed_command):\n    subprocess.call('chmod 777 .', shell=True)\n\npriority = 1000  # Lower first, default is 1000\n\nrequires_output = True\n```\n\n[More examples of rules](https://github.com/nvbn/thefuck/tree/master/thefuck/rules),\n[utility functions for rules](https://github.com/nvbn/thefuck/tree/master/thefuck/utils.py),\n[app/os-specific helpers](https://github.com/nvbn/thefuck/tree/master/thefuck/specific/).\n\n## Settings\n\nSeveral *The Fuck* parameters can be changed in the file `$XDG_CONFIG_HOME/thefuck/settings.py`\n(`$XDG_CONFIG_HOME` defaults to `~/.config`):\n\n* `rules` \u0026ndash; list of enabled rules, by default `thefuck.const.DEFAULT_RULES`;\n* `exclude_rules` \u0026ndash; list of disabled rules, by default `[]`;\n* `require_confirmation` \u0026ndash; requires confirmation before running new command, by default `True`;\n* `wait_command` \u0026ndash; max amount of time in seconds for getting previous command output;\n* `no_colors` \u0026ndash; disable colored output;\n* `priority` \u0026ndash; dict with rules priorities, rule with lower `priority` will be matched first;\n* `debug` \u0026ndash; enables debug output, by default `False`;\n* `history_limit` \u0026ndash; numeric value of how many history commands will be scanned, like `2000`;\n* `alter_history` \u0026ndash; push fixed command to history, by default `True`;\n* `wait_slow_command` \u0026ndash; max amount of time in seconds for getting previous command output if it in `slow_commands` list;\n* `slow_commands` \u0026ndash; list of slow commands;\n* `num_close_matches` \u0026ndash; maximum number of close matches to suggest, by default `3`.\n\nAn example of `settings.py`:\n\n```python\nrules = ['sudo', 'no_command']\nexclude_rules = ['git_push']\nrequire_confirmation = True\nwait_command = 10\nno_colors = False\npriority = {'sudo': 100, 'no_command': 9999}\ndebug = False\nhistory_limit = 9999\nwait_slow_command = 20\nslow_commands = ['react-native', 'gradle']\nnum_close_matches = 5\n```\n\nOr via environment variables:\n\n* `THEFUCK_RULES` \u0026ndash; list of enabled rules, like `DEFAULT_RULES:rm_root` or `sudo:no_command`;\n* `THEFUCK_EXCLUDE_RULES` \u0026ndash; list of disabled rules, like `git_pull:git_push`;\n* `THEFUCK_REQUIRE_CONFIRMATION` \u0026ndash; require confirmation before running new command, `true/false`;\n* `THEFUCK_WAIT_COMMAND` \u0026ndash; max amount of time in seconds for getting previous command output;\n* `THEFUCK_NO_COLORS` \u0026ndash; disable colored output, `true/false`;\n* `THEFUCK_PRIORITY` \u0026ndash; priority of the rules, like `no_command=9999:apt_get=100`,\nrule with lower `priority` will be matched first;\n* `THEFUCK_DEBUG` \u0026ndash; enables debug output, `true/false`;\n* `THEFUCK_HISTORY_LIMIT` \u0026ndash; how many history commands will be scanned, like `2000`;\n* `THEFUCK_ALTER_HISTORY` \u0026ndash; push fixed command to history `true/false`;\n* `THEFUCK_WAIT_SLOW_COMMAND` \u0026ndash; max amount of time in seconds for getting previous command output if it in `slow_commands` list;\n* `THEFUCK_SLOW_COMMANDS` \u0026ndash; list of slow commands, like `lein:gradle`;\n* `THEFUCK_NUM_CLOSE_MATCHES` \u0026ndash; maximum number of close matches to suggest, like `5`.\n\nFor example:\n\n```bash\nexport THEFUCK_RULES='sudo:no_command'\nexport THEFUCK_EXCLUDE_RULES='git_pull:git_push'\nexport THEFUCK_REQUIRE_CONFIRMATION='true'\nexport THEFUCK_WAIT_COMMAND=10\nexport THEFUCK_NO_COLORS='false'\nexport THEFUCK_PRIORITY='no_command=9999:apt_get=100'\nexport THEFUCK_HISTORY_LIMIT='2000'\nexport THEFUCK_NUM_CLOSE_MATCHES='5'\n```\n\n## Third-party packages with rules\n\nIf you'd like to make a specific set of non-public rules, but would still like\nto share them with others, create a package named `thefuck_contrib_*` with\nthe following structure:\n\n```\nthefuck_contrib_foo\n  thefuck_contrib_foo\n    rules\n      __init__.py\n      *third-party rules*\n    __init__.py\n    *third-party-utils*\n  setup.py\n```\n\n*The Fuck* will find rules located in the `rules` module.\n\n## Experimental instant mode\n\nThe default behavior of *The Fuck* requires time to re-run previous commands.\nWhen in instant mode, *The Fuck* saves time by logging output with [script](https://en.wikipedia.org/wiki/Script_(Unix)),\nthen reading the log.\n\n[![gif with instant mode][instant-mode-gif-link]][instant-mode-gif-link]\n\nCurrently, 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.\n\nTo enable instant mode, add `--enable-experimental-instant-mode`\nto the alias initialization in `.bashrc`, `.bash_profile` or `.zshrc`.\n\nFor example:\n\n```bash\neval $(thefuck --alias --enable-experimental-instant-mode)\n```\n\n## Developing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License MIT\nProject License can be found [here](LICENSE.md).\n\n\n[version-badge]:   https://img.shields.io/pypi/v/thefuck.svg?label=version\n[version-link]:    https://pypi.python.org/pypi/thefuck/\n[travis-badge]:    https://travis-ci.org/nvbn/thefuck.svg?branch=master\n[travis-link]:     https://travis-ci.org/nvbn/thefuck\n[appveyor-badge]:  https://ci.appveyor.com/api/projects/status/1sskj4imj02um0gu/branch/master?svg=true\n[appveyor-link]:   https://ci.appveyor.com/project/nvbn/thefuck\n[coverage-badge]:  https://img.shields.io/coveralls/nvbn/thefuck.svg\n[coverage-link]:   https://coveralls.io/github/nvbn/thefuck\n[license-badge]:   https://img.shields.io/badge/license-MIT-007EC7.svg\n[examples-link]:   https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif\n[instant-mode-gif-link]:   https://raw.githubusercontent.com/nvbn/thefuck/master/example_instant_mode.gif\n[homebrew]:        https://brew.sh/\n[linuxbrew]:       https://linuxbrew.sh/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fthefuck-debian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscorphus%2Fthefuck-debian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscorphus%2Fthefuck-debian/lists"}