Register
It is currently Thu Jul 24, 2014 2:25 am

cd convenience functions


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Fri Sep 18, 2009 6:47 pm   

Joined: Tue Sep 08, 2009 2:05 pm
Posts: 1
Do you have this in your .bashrc?
Code:
  alias ..='cd ..'
  alias ...='cd ../..'

I wrote a function to do that, but with tab completion and other features. For example, I can `cd` to /etc from anywhere in my directory tree just by doing `o etc`.

The other function changes your directory to a sensible place based on your last command.

Code is here: ocd

There's also a script in there to clear out old duplicate items from your bash history file.

Hope you'll find it useful. Any feedback is welcome =)


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP