Technology news site

This App Auto-Corrects Your Previous Line Of Command In Console Environment


If you’re a console user, then you may have come across mistyping a command and in turn get a response like “no such command”. But Russian developer Vladimir Lakovlev created an application which he has made available on GitHub to help auto correct your previous command in the console environment. Starting with the application’s name, The F*ck (never mind the name) alerts helps you get a correct command when you’re not sure.

Code correct

So for example, when you enter the following command,

➜ apt-get install vim

// You get the following error message// 
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?

//But entering the “fuck” command, here’s what you get//

➜ fuck
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done

What the “fuck” command does is that it matches a rule to a failed command and automatically runs a new and correct command to run and the developer says he has created more than 110 rules so far. The application is also flexible in that it welcomes more rules from other users. The F*ck can be installed on Mac, Linux, and in shells like PowerShell, Zsh, Bash and tcsh.

HTML Snippets Powered By : XYZScripts.com