News for hackers. Stuff that matters.
Re:The Fuck – Correct your previous console command by melling on Friday April 17, 2015 @04:31PM (#9397035)
Typo correction is useful too.

^foo^bar

git brnch

^r^ra

This works on all Unix machines

Re:The Fuck – Correct your previous console command by stewartbutler on Friday April 17, 2015 @05:56PM (#9397409)
*Works if properly implemented. Had to manually disable this behavior in eshell as it prevented you from running regex with two carets, e.g. '$ grep -E '^sometext[^ ]+moretext'.

You can also just run a sed style substitution in most shells, e.g. '$ !!:s/before/after/' or '$ !!:gs/x/y/', which is safer IMO.

Re:The Fuck – Correct your previous console command by lectrick on Friday April 17, 2015 @10:21PM (#9398097)
You know... I've seen this notation on discussion forums (and probably IRC etc.) for years, and had no idea until now that it was a reference to this shell capability lol