Command line shortcut #977 - shell auto-completion

I was trying emerge app-emulation/vmware-server and kept getting crazy GPL errors, so I needed to reboot to try a few different kernels i’ve compiled to see if one of them has the right options vmware is begging for. Every time I open a new shell, I need to export my proxy settings (I know I can set it in my profile, but I didn’t really have the system completely configured and I wasn’t planning on keeping it behind this proxy for long so I didn’t want to make it perm.) … I’ll skip the tab completion because if you haven’t run into that at least by accident, there’s something wrong with you. You can even do that from XP’s fake dos, although it is pretty useless they way they implemented it.

Instead of typing the export string out each time and the emerge line too, I just recalled them from the history knowing that the last set of commands that started with those characters were the commands I wanted.

jen2# !exp
export http_proxy=”http://10.0.0.99:8002
jen2# !em
emerge -av vmware-server

If there were several commands like that recently, or I wasnt’ sure which was the last one, I could look at the history and figure out which number to run, and run that instead:

jen2# !315
export http_proxy=”http://10.0.0.99:8002
jen2# !318
emerge -av vmware-server

If you didn’t know about these handy shortcuts, now you know, and knowing is have the battle. So when is that movie coming out anyway!!?

Posted by admica   @   18 February 2009

Related Posts

Like this post? Share it!

Digg Twitter StumbleUpon Delicious Technorati Facebook RSS

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Name

Email

Website

Previous Post
« gentoo unknown filesystem type ‘ext2′
Next Post
Install OpenNMS network monitoring on Fedora 10 »
Powered by Wordpress   |   Lunated designed by ZenVerse