mirror of
https://github.com/nvbn/thefuck.git
synced 2025-04-19 09:10:47 +01:00
parent
16f9ab6538
commit
a3cec536b2
@ -9,8 +9,16 @@ alias fuck='eval $(thefuck $(fc -ln -1))'
|
|||||||
|
|
||||||
Add this function to `config.fish`:
|
Add this function to `config.fish`:
|
||||||
```fish
|
```fish
|
||||||
function fuck
|
function __thefuck_repl -d 'Replace operators into fish-compatible'
|
||||||
eval (thefuck $history[1])
|
set -l tmp (echo $argv | sed 's/ && / ; and /g')
|
||||||
|
echo $tmp | sed 's/ || / ; or /g'
|
||||||
|
end
|
||||||
|
|
||||||
|
function fuck -d 'Correct your previous console command'
|
||||||
|
set -l eval_script (mktemp 2>/dev/null ; or mktemp -t 'thefuck')
|
||||||
|
thefuck $history[1] > $eval_script
|
||||||
|
eval (__thefuck_repl (cat $eval_script))
|
||||||
|
rm $eval_script
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user