Open v217 opened 4 years ago
A workaround for the first point is
daudin --shell '/usr/bin/env -S'
Oh and I noticed that terminating a subprocess eg sleep 1000
with Ctrl+c
does work for --shell='bash -c'
but does not work for
--shell='sh -c'
, --shell='fish -c'
and --shell='env -S'
I think that's because bash parses the command and if there's only one command execve into the command and exits.
I also came across this article, which maybe is also useful for daudin: Zsh and Fish’s simple but clever trick for highlighting missing linefeeds
Sorry for this sudden agglomeration of ideas. I think in the long run it would be advantageous to factor out the non-interactive code. This would make it far easier to understand the code.
Hey @v217 - thanks for the comments, and definitely no need to apologize! :-) Right now I can't spend much time working on daudin but would like to. Anyway, I'm happy to chat and to think etc., and maybe will have time to work on small things (if I understand them!). Feel free to send pull requests if you want to & have time. Thanks for the nice comments. I don't think daudin is too far away from actually being usable, and I would like to try switching. But I use fish and would certainly miss the predictive text it adds to my command line based on previous commands.
BTW, daudin seems to sometimes screw up the terminal settings, which I need to dig into.
Thank you for this great shell! Two ideas:
--shell=False
for running system commands without a shell e.g.subprocess.run(... shell=False)
The scripts would be more portable, faster and less error prone and best of all you can forget about all the shell idiosyncrasies like shell escaping etc ... and error handling would also be much easier.