Fix Command
fcis a shell builtin command that lets you do some cool stuff with your shell history.Run it without any arguments, and you can edit the previous shell command in your text editor of choice1. To run your freshly-edited command, just save and quit.
fc -lreturns a numbered list of recent commands (just likehistory).
fcfollowed by one of those numbers will open that command in your editor.If you follow
fcwith a string, it’ll open up the last command starting with that string—eg.fc mplwill open the lastmplayercommand.That’s just the basics—you can do all sorts of crazy command editing gymnastics with
fc, but the details vary from shell to shell. For details, see: bash, ksh and zsh.Thanks, @gummo!
See also:
Source: onethingwell
22 Notes/ Hide
-
gioielli liked this
-
maggit reblogged this from onethingwell
-
tipsformyfutureself reblogged this from onethingwell
-
hint liked this
-
svnlto liked this
-
cafetouba liked this
-
onethingwell posted this