Open Hedronmx opened 2 years ago
I think you could just change this line in the main.go
file:
command := exec.Command("bash", "-c", commandText)
https://github.com/p-e-w/shin/blob/9c67a6d28b77a8d3eae9518f82e928bfe01d30d0/main.go#L173
Making the command interpreter configurable is something I'm considering.
Could you describe your use case? This would help me decide whether adding this feature makes sense. Zsh and Bash differ mostly in the interactive shell, which is irrelevant for Shin. What would you be able to do differently if Shin ran Zsh instead of Bash?
One use case I have would be to have a hotkey that opens shin but as a python command.
That way, I could activate shin and do simple multiplication or quick string manipulation.
Ideally it would be configurable as an argument (not sure if this is possible?) so I could bind separate hotkeys with ibus engine shin --shell 'bash -c'
or ibus engine shin --shell 'python -c'
Ideally it would be configurable as an argument (not sure if this is possible?) so I could bind separate hotkeys with ibus engine shin --shell 'bash -c' or ibus engine shin --shell 'python -c'
That is unfortunately not possible. ibus engine
takes an engine name, which is cross-referenced with the engine definition from the component XML. It doesn't accept arbitrary commands. Switching between interpreters would need to be handled within Shin itself.
Maybe there could be some standard shell scripts in shin's bin folder to easily use Python etc.
@apockill, you can have Python with:
#!/bin/bash
python3 -c "print($*)"
One use case I have would be to have a hotkey that opens shin but as a python command.
That way, I could activate shin and do simple multiplication or quick string manipulation.
Ideally it would be configurable as an argument (not sure if this is possible?) so I could bind separate hotkeys with
ibus engine shin --shell 'bash -c'
oribus engine shin --shell 'python -c'
This is exactly my use case! To change depending on the commands i want to run.
Hello! instead of using bash would it be possible to use ZSH?