Multi Commander > Support and Feedback

Custom Command to Run in Git Bash

(1/1)

parcher:
I want to create a custom command to run the program G'Mic within Git Bash on selected images.

Command:


--- Code: ---gmic *jpg -gimp_montage 4,\""V(H(0,1),H(2,V(3,4)))"\",1,1.0,0,5,0,0,0,255,0,0,0,0,0 -o 0000.jpg
--- End code ---

This command takes jpg images, from which a montage of the jpgs is created.

This is what I have:


--- Code: ---Group: MC
Function: Run
Options/Parameters: ADMIN

Command Type: Custom Commands

Command:

MC.Run CMD="gmic *jpg -gimp_montage 4,\""V(H(0,1),H(2,V(3,4)))"\",1,1.0,0,5,0,0,0,255,0,0,0,0,0 -o 0000.jpg"
--- End code ---

When I run this command on selected jpgs I see the Windows command shell quickly open and close and not perform the requested action. This is because the command doesn't work in Windows command shell. It needs to run in Git Bash, which I have installed and have confirmed works with this command.

I assume I need to tell MultiCommander to run this command in Git Bash. But how to do it? And will the resulting montage be placed in the folder of the source images?

My Git Bash path:
--- Code: ---C:\Program Files (x86)\Git\bin\sh.exe
--- End code ---

Mathias (Author):
MC will send the everything in the CMD="" and Windows to run it. 
You need execute sh.exe from CMD and the thing you want it to run as a parameter to it. if that is possible. Not sure how sh.exe works

How would you run it from a normal console problem. ?
Maybe easier to create a UserDefinedCommand of Batch that create a .bat script and in that you maybe can launch sh and this things.

However you need to include sh.exe some way..  There is no way of MC to know about sh.exe

parcher:
I found a solution:


--- Code: ---C:\Windows\System32\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i -- C:\Users\Scripts\gmicmont.sh"
--- End code ---

Command type: External

Navigation

[0] Message Index

Go to full version