Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.