mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-07 05:31:18 +00:00
Created Shell aliases (markdown)
parent
34bd6580c9
commit
16f9ab6538
29
Shell-aliases.md
Normal file
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" }
|
||||
}
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user