0

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?

Thanks!

1 Answer 1

1

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

cd .

to ~/.bashrc.

1
  • Well, that was pretty obvious. Thank you, Dennis. :-) I'll accept you r answer as soon as restriction is off. Feb 27, 2013 at 14:17

You must log in to answer this question.

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