Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an alias for cd command that does some additional logic before running actual cd (if you want the details, it activates virtualenv if it finds it in the directory). But when I open a new tab, gnome-terminal opens terminal in the same path without running my alias, so I have to do cd . every time to fix it.

Is there a solution for this? Maybe some kind of post-open-new-tab hook or something?


share|improve this question
up vote 1 down vote accepted

Assuming you define you alias somewhere in ~/.bashrc or another file that is sourced by it, you can just append

cd .

to ~/.bashrc.

share|improve this answer
Well, that was pretty obvious. Thank you, Dennis. :-) I'll accept you r answer as soon as restriction is off. – Dmitry Gladkov Feb 27 '13 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .