Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: execute function on directory change
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Jan-Gerrit

Posts: 1
Registered: 3/29/14
execute function on directory change
Posted: Mar 29, 2014 9:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

I want to customize my command history, so that I have a current history for multiple folders i'm working in (different projects). The motivation is also to put this history-file under revision control, so that when I go back to an older version of a project, I can quickly see what was called in that (previous) state of the project.

To implement this, the first step would be to load/save the command history, when i change my folder. I tried to overload the buildin cd function like this:

function cd ( newFolder )
% some functionality ...
builtin('cd',newFolder);
end
This way, I can load/save the command history. If i call cd from the command window, this works fine. The problem is, that matlab seems to call a different function internally when I change the folder with the gui-tools. In that case, my function is not called.

Is there a way to get more controll over the gui? What function is used here? Maybe there already exist some kind of solution to my overall goal?

Thanks

Jan



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.