diff --git a/Shell-aliases.md b/Shell-aliases.md new file mode 100644 index 0000000..fdb5856 --- /dev/null +++ b/Shell-aliases.md @@ -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" } +} +``` \ No newline at end of file