How do I create a command to change directories in the Far Manager command prompt?
It seems that the commands in the Far command prompt are being run in a subshell, so directory changes have no effect.
I can use doskey macros to create aliases, but then I would have to run doskey manually to install the macros every time I start Far.
I know there are the Ctrl+# hotkeys, but I don't want to have to hit Ctrl+O, Ctrl+#, Ctrl+O when I'm working in the command prompt.
Is there a way to run a batch script when Far starts? Or, is there a way to define a DOS command to change directories with a Far macro or something that wouldn't involve activating the panel and using a hotkey?
Macro to change directory in Far command prompt
- HaRT
- Moderator
- Posts: 10863
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 221 times
- Been thanked: 358 times
Macro to change directory in Far command prompt
Far has a number of internal commands which are run by Far itself directly. CD is one of these commands.
There are ways to start it automatically. Search for doskey in the Russian-language part of the forum.
You can record these sequences as key macros.
What are the scenarios you'd like to cover with such commands?
Фар есть инструмент, а не нянька. © 2009 DrKnS
Macro to change directory in Far command prompt
Oh it's really no big deal. I was just trying to emulate my bash stuff in the Windows command prompt to be consistent. I have a bunch of bash functions that cd to various places, but it's really not a very good solution to begin with. Far takes care of most of the problems cd'ing around, I should just use it as intended. I just thought setting up a few commands would be easy, but I've been trying to figure this out for a couple hours now. I think I should probably give up.
- HaRT
- Moderator
- Posts: 10863
- Joined: Tue 30 Aug, 2005 17:21
- Has thanked: 221 times
- Been thanked: 358 times
Macro to change directory in Far command prompt
old_gregg, my approach is to have 1-3 dirs assigned to folder shortcuts 0-9 for fastest access, and to navigate to other directories via folders history (filtering turned on by default using respective scripts). Other people use more techniques: extended folder shortcuts, additional items in disks menus, user sub-/menu/-s, calling plugins/scripts from command line, etc.
Фар есть инструмент, а не нянька. © 2009 DrKnS
Macro to change directory in Far command prompt
Since Far Manager handles the CD commands itself, can I hook into that mechanism and define my own commands that run macros? I've never used Far macros, so I'm not sure what they can do.
- John Doe
- Бюрократ
- Posts: 13852
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 428 times
- Contact:
Macro to change directory in Far command prompt
Sure you can, using console aliases, as you intended in first post.
- John Doe
- Бюрократ
- Posts: 13852
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 428 times
- Contact:
Macro to change directory in Far command prompt
Google "doskey", and/or google-translate some russian topics:
viewtopic.php?p=117329#p117329
viewtopic.php?f=60&t=8546
viewtopic.php?p=117329#p117329
viewtopic.php?f=60&t=8546