[GH-ISSUE #32] rc_file is not respected and zsh support. #33

Closed
opened 2026-03-04 12:24:05 +03:00 by kerem · 2 comments
Owner

Originally created by @oleg-andreyev on GitHub (Jan 4, 2021).
Original GitHub issue: https://github.com/cascadium/wsl-windows-toolbar-launcher/issues/32

Command

 wsl-windows-toolbar -r ~/.zshrc

Result:

#!/bin/bash -i
source /home/olega/.bashrc
cd "/home/olega"
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/phpstorm_phpstorm.desktop /snap/bin/phpstorm  > /dev/null 2>&1 &
disown

Expected

#!/bin/zsh -i
source /home/olega/.zshrc
Originally created by @oleg-andreyev on GitHub (Jan 4, 2021). Original GitHub issue: https://github.com/cascadium/wsl-windows-toolbar-launcher/issues/32 Command ```bash wsl-windows-toolbar -r ~/.zshrc ``` Result: ```bash #!/bin/bash -i source /home/olega/.bashrc cd "/home/olega" env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/phpstorm_phpstorm.desktop /snap/bin/phpstorm > /dev/null 2>&1 & disown ``` Expected ```bash #!/bin/zsh -i source /home/olega/.zshrc ```
kerem closed this issue 2026-03-04 12:24:06 +03:00
Author
Owner

@fquinner commented on GitHub (Jan 4, 2021):

The rc_file option is more for a bashrc or bash compatible zshrc where you want to source additional stuff before launching using bash in the bash template that comes with the package.

To use an alternative shell, you'd need to specify a template.

To do this, create a file which is based on a modified version of this: https://raw.githubusercontent.com/cascadium/wsl-windows-toolbar-launcher/master/wsl-windows-toolbar-template.sh.j2

And pass it in with -J /path/to/your/template.j2.

<!-- gh-comment-id:753954215 --> @fquinner commented on GitHub (Jan 4, 2021): The rc_file option is more for a bashrc or bash compatible zshrc where you want to source additional stuff before launching using bash in the bash template that comes with the package. To use an alternative shell, you'd need to specify a template. To do this, create a file which is based on a modified version of this: https://raw.githubusercontent.com/cascadium/wsl-windows-toolbar-launcher/master/wsl-windows-toolbar-template.sh.j2 And pass it in with `-J /path/to/your/template.j2`.
Author
Owner

@oleg-andreyev commented on GitHub (Jan 9, 2021):

@fquinner thanks!

<!-- gh-comment-id:757358678 --> @oleg-andreyev commented on GitHub (Jan 9, 2021): @fquinner thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wsl-windows-toolbar-launcher#33
No description provided.