mirror of
https://github.com/Crocmagnon/dotfiles.git
synced 2024-11-05 06:13:59 +01:00
Add fuck alias
This commit is contained in:
parent
3ef5c7fd3c
commit
d0c995222c
1 changed files with 9 additions and 0 deletions
9
dot_config/fish/private_functions/fuck.fish
Normal file
9
dot_config/fish/private_functions/fuck.fish
Normal file
|
@ -0,0 +1,9 @@
|
|||
function fuck --description '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
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue