1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-07 13:41:21 +00:00

Created Shell aliases (markdown)

Vladimir Iakovlev 2015-04-27 07:52:52 +02:00
parent 34bd6580c9
commit 16f9ab6538

29
Shell-aliases.md Normal file

@ -0,0 +1,29 @@
# Bash and Zsh
Add this alias to `.bashrc` or `.zshrc` or `.bash_profile` (for OSX):
```bash
alias fuck='eval $(thefuck $(fc -ln -1))'
```
# Fish
Add this function to `config.fish`:
```fish
function fuck
eval (thefuck $history[1])
end
```
# Powershell
Put this in your Powershell `$PROFILE` on Windows:
```powershell
function fuck {
$fuck = $(thefuck (get-history -count 1).commandline)
if($fuck.startswith("echo")) {
$fuck.substring(5)
}
else { iex "$fuck" }
}
```