mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-11-04 09:02:08 +00:00 
			
		
		
		
	@@ -9,8 +9,16 @@ alias fuck='eval $(thefuck $(fc -ln -1))'
 | 
			
		||||
 | 
			
		||||
Add this function to `config.fish`:
 | 
			
		||||
```fish
 | 
			
		||||
function fuck
 | 
			
		||||
    eval (thefuck $history[1])
 | 
			
		||||
function __thefuck_repl -d 'Replace operators into fish-compatible'
 | 
			
		||||
    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
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user