jesseduffield / lazygit

simple terminal UI for git commands
MIT License
51.82k stars 1.82k forks source link

Change default terminal for custom commands #1550

Open MiroslavMikus opened 2 years ago

MiroslavMikus commented 2 years ago

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

alexn-s commented 2 years ago

+1

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

nullishamy commented 2 years ago

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?

mark2185 commented 2 years ago

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 .

nullishamy commented 2 years ago

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.