mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-29 21:35:36 +00:00
10 lines
426 B
Fish
10 lines
426 B
Fish
|
function fuck -d "Correct your previous console command"
|
||
|
set -l fucked_up_command $history[1]
|
||
|
env TF_SHELL=fish TF_ALIAS=fuck PYTHONIOENCODING=utf-8 thefuck $fucked_up_command THEFUCK_ARGUMENT_PLACEHOLDER $argv | read -l unfucked_command
|
||
|
if [ "$unfucked_command" != "" ]
|
||
|
eval $unfucked_command
|
||
|
builtin history delete --exact --case-sensitive -- $fucked_up_command
|
||
|
builtin history merge ^ /dev/null
|
||
|
end
|
||
|
end
|