lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Change default terminal for custom commands

Open MiroslavMikus opened this issue 4 years ago • 4 comments

Hey, I'm playing with custom commands and can't find docu/config to change the default terminal.

Describe the solution you'd like I would like to change the default terminal path and parameters.

Describe alternatives you've considered Right now we can kind of start powershell from CMD -_- pwsh.exe -NoProfile -WindowStyle Hidden -command "& { gps > ps.txt}" - this does not work

I have found some documentation about subprocess in custom commands. Now, I'm running lazy-git in Powershell 7 and WindowsTerminal. It looks like whatever I choose to use subprocess or not I will end in CMD. Although I would expect it to be Powershell 7.

Thanks

MiroslavMikus avatar Oct 26 '21 14:10 MiroslavMikus

+1

Are there any updates? I would prefer to use powershell instead of cmd.exe

alexn-s avatar Jun 16 '22 23:06 alexn-s

After digging around a bit, it would seem we need to change the way the runners (commands/oscommands/*runner.go) operate, though it seems to be an issue with the lib that we use, pty. We should watch this?

nullishamy avatar Aug 15 '22 18:08 nullishamy

The link returns 404.

The thing is that these are currently hardcoded, e.g. bash for unix and cmd for windows (I'm guessing), we should make that configurable. Something like that is underway in #2096 .

mark2185 avatar Aug 15 '22 19:08 mark2185

Fixed the link. Does that affect the runners (assuming they are responsible for running custom commands)? I couldn't see a relation, though I'm not very familiar with the codebase.

nullishamy avatar Aug 15 '22 19:08 nullishamy