Whether I fat-finger a command or my MacBook Pro keyboard’s keys don’t want to respond like they should, I’m frequently misspelling commands. What’s more frustrating is that many of these commands are long, taking making fixing theme time-consuming.
Luckily a Twitter follower is looking out for me, providing me a quick command for fixing the misspelled command:
~ $ crul davidwalsh.name -bash: crul: command not found ~ $ ^crul^curl curl davidwalsh.name <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="https://davidwalsh.name/">here</a>.</p> <hr> <address>Apache Server at davidwalsh.name Port 80</address> </body></html>
^ command usage above returns fixes the spelling from the previous command, executes the command, and as a bonus, adds the correct command to history.
Small tips like these and
git checkout - make my command life experience so much better. What’s your favorite command line trick?
You’ve probably heard the talk around the water cooler about how promises are the future. All of the cool kids are using them, but you don’t see what makes them so special. Can’t you just use a callback? What’s the big deal? In this article, we’ll…
6 Things You Didn’t Know About Firefox OS
The idea of CSS sprites is pretty genius. For those of you who don’t know the idea of a sprite, a sprite is basically multiple graphics compiled into one image. The advantages of using sprites are: Fewer images for the browser to download, which means…
Credit: Source link