Re: change dir using a menu command

On Fri, 16 Jan 2004, David E wrote:


I've written a samba browser/mounter script, what it does is use
smbclient, to get a list of samba shares, and gives me a list of shares
using 'dialog', when I choose a share it is mounted. I've added a menu
item to the menu file, that will run the program, and I want mc to jump
to the mounted directory, I have looked around, and saw that it was
possible with the $MC_CONTROL_FILE variable, but then I saw that it was
disabled. So I'm wondering how (and if) it is possible.

It's currently impossible.  If you want to add this functionality, see
execute_menu_command() in src/user.c.  You could add a %cd macro in a way
similar to the recently added %view (you'll need the CVS version or
mc-4.6.1-pre1 to see it).  Please note that mc doesn't execute the
commands step by step.  The whole menu entry is put to a script and run as
a whole.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]