mskyaxl / wsl-terminal

Terminal emulator for Windows Subsystem for Linux (WSL)
MIT License
3.12k stars 158 forks source link

[suggestion] Allow for custom program execution upon program opening #71

Closed DaJakerBoss closed 6 years ago

DaJakerBoss commented 6 years ago

I have been scanning your source code and no matter what I do I can't find a way to change the way WSL-Terminal opens. I am trying to change the program so when it opens, it opens the zsh shell, goes to my home directory, then clears everything to remove clutter. This would look something along the lines of:

[previous code] && cd ~/ && clear && zsh

Of course an option to custom edit this particular startup code would be beneficial to allow users to customize how the program acts when it opens. It would allow them to open in their specified directory and automatically enter their preferred shell.

Could you either add this as a feature or tell me what line of code controls what the program does on opening?

goreliu commented 6 years ago

I think it's better to put them in ~/.bashrc, or set shell=/bin/zsh in etc/wsl-terminal.conf.