How to change FAR Manager's shell?

I want all commands run from FAR to be executed under, say, Bash. Is there a way to tell FAR to bypass all commands to something other than cmd.exe?

1 Answer

You'll need to change the Comspec to bash. In addition you'll want to change the arguments passed to the Comspec and for which commands the Comspec should be used.

You could change the environment variable COMSPEC before (or manually after) starting Far Manager to bash (%windir%\system32\bash.exe) or change the internal settings (stored in %AppData%\Roaming\Far Manager\Profile\generalconfig.db).

You can change the settings by executing far:config in the Far Manager prompt. Press Ctrl+Alt+F to start filtering by name and then type comspec.

Default comspec options:

 System.Executor.Comspec │string │%COMSPEC% System.Executor.ComspecArguments │string │/S /C "{0}" System.Executor.ComspecCondition │string │

You can change them to:

* System.Executor.Comspec │string │C:\Windows\system32\bash.exe
* System.Executor.ComspecArguments │string │"{0}"
* System.Executor.ComspecCondition │string │.*

If you don't change the ComspecCondition only some commands will be passed as arguments to bash. For example if you execute notepad with an empty ComspecCondition (default value) notepad will be started normally.

To reset a value to its initial condition, edit the value and click on the Reset button.

More details about how this settings are used can be found in the source code.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like