imsnif / multitask

A mini-CI as a Zellij plugin
MIT License
73 stars 2 forks source link

Multitask doesn't respect $SHELL #1

Closed calebmeyer closed 11 months ago

calebmeyer commented 1 year ago

I'm on macOS, using iTerm2 as my terminal, and the Friendly Interactive Shell (fish) as my shell. I have fish all set up with the correct environment variables, functions, aliases, etc.

When I run this plugin, all commands are executed in bash:

image

I can get around this with fish -c "api; cargo run" or similar, but it would be nice if the default shell was used like the default $EDITOR.

imsnif commented 1 year ago

Yes, I am with you.

I'll try to implement the API on the Zellij side to allow this when I get the chance.

leakec commented 11 months ago

@imsnif Just added a pull request (#2) that I believe solves this. zellij 0.38 allows a configuration to be set for the plugin. Users can pass in shell=$SHELL when invoking the plugin, which is stored on the state. This is passed to the commands that are run in place of what used to be bash. Note, bash is still used as the default if shell is not set in the configuration when loading the plugin.

leakec commented 11 months ago

@calebmeyer This has been implemented in the 0.38.2 release. Invoking the plugin using

zellij action start-or-reload-plugin file:~/zellij-plugins/multitask.wasm --configuration "shell=$SHELL"

should run commands with your default shell rather than bash.