Bash
Add this alias to .bashrc or .bash_profile (.zshrc for macOS):
To overcome Python unicode warning on your unicode Windows Git-Bash console:
Add this line before the line above in your ~/.bashrc on Windows:
POSIX-compliant shell
Add this alias to your shell's config/RC file:
If you use zsh with oh-my-zsh, try this awesome thefuck plugin.
Fish
Add this function to config.fish:
To avoid the delay of the shell startup, you could also create an autoloaded function.
Create a file ~/.config/fish/functions/fuck.fish instead and paste the output of thefuck --alias
into that file. Fish should start as fast as before.
For cases when you override a command and turn it into an alias (e.g. alias sed=gsed or alias git=hub), you should add all them to the THEFUCK_OVERRIDDEN_ALIASES environment variable, separated by comma. For example, in your config.fish:
Powershell
Put this in your Powershell $PROFILE on Windows:
To overcome Python unicode warning on your unicode Powershell console:
Add this line before the line above in your Powershell $PROFILE on Windows:
To overcome PowerShell not running scripts, for which the error looks as such:
You could set execution policy to unrestricted through the PowerShell command:
Click here to read more about Microsoft's execution policies.
tcsh
xonsh
Install the xonsh extension:
And then load it (you can add this to xonshrc for it to be loaded in every xonsh session):
wsl
in wsl you may also have to put export PATH="$PATH:~/.local/bin/" before the alias
Hilbish
Make sure you import the commander library:
hilbish.history.get(hilbish.history.size() - 1) will load the last typed command so you can put it into an alias here:
Nushell
Add this alias to your config.nu: