Skip to content

shipengtaov/fuck_r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Fuck Replace

Inspired by thefuck

examples:

➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

➜ fuck apt 'sudo apt'
sudo apt-get install vim
[sudo] password:
Reading package lists... Done
...
➜ python not_exist.py
E: python: can't open file 'not_exist.py': [Errno 2] No such file or directory

➜ fuck not_exist somedir/somefile
python somedir/somefile.py
...
➜ mang it
E: zsh: command not found: mang

➜ fuck 'g ' ' g'
man git
...

Installation

ln -s fuck_r/fuck_r/main.py /usr/local/bin/fuck_r

Add to .bashrc or .zshrc:

function fuck { $(fuck_r "$1" "$2" $(fc -ln -1)); }
export -f fuck

License

MIT

About

fuck replace

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages