commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
Next time you are using your shell, try typing ctrl-x e (that is holding control key press x and then e). The shell will take what you've written on the command line thus far and paste it into the editor specified by $EDITOR. Then you can edit at leisure using all the powerful macros and commands of vi, emacs, nano, or whatever.
There is 1 alternative - vote for the best!
* in bash-shell You can capture the current commandline to a text-editor:
* simply press: CTRL+x+e
* Your current commandline will pe put into Your default text-editor (export EDITOR=vim)
If you can do better, submit your command here.
You must be signed in to comment.
use 9term/plan9, pressing escape puts the term in hold mode and nothing is sent until youpress escape again to release it.
Nice. You have my vote on this one. This really is gonna be useful. I would write it 'ctrl-x ctrl-e' tho. First reflex to me was to hit 'ctrl-x' release it and then press 'e' (i'm used to screen like shortcuts)
Also forgot to say, this is REALLY going to be useful when entering a long command, test it and then want to make a script out of it. no need to 'echo !! > script'. Just command history up, ctrl-x ctrl-e, and save :D
or just type fc and hit the enter key
Didn't work for me. This is presumably as I use vi mode.
In vi mode, it's esc (for command mode) and then v.
You have to configure the VISUAL enviromnet variable prior to use C-x, C-e
export VISUAL=viIt's C-x C-e.
Doesn't work in zsh.
note: When you save this with its given filename (just :wq), it is executed and then discarded by the shell. If you want to keep it, save it explicitly to a new file first (:w )
Oops, that should read :w <newfile>