-
Hi everyone, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Do you mean https://github.com/mvdan/sh/blob/master/cmd/gosh/main.go, or the internal libraries like syntax and interp? The libraries don't implement the user-facing shell with the prompt its features like readline or tab completion, so in terms of compatibility, they should be fine - you implement a "full shell" with those libraries as building blocks, much like cmd/gosh does. As far as cmd/gosh, like you said, it's a bit of a proof of concept and testing tool rather than a complete shell. I think it's a bit overkill to pull in heavier dependencies like readline or tab completion into this module. But writing such a complete shell in a third-party module would certainly be useful. I would suggest to take cmd/gosh as a starting point, but to simply copy the code and adapt it as needed. It's not meant to be a library in any way, but rather a pretty simple and short |
Beta Was this translation helpful? Give feedback.
Do you mean https://github.com/mvdan/sh/blob/master/cmd/gosh/main.go, or the internal libraries like syntax and interp?
The libraries don't implement the user-facing shell with the prompt its features like readline or tab completion, so in terms of compatibility, they should be fine - you implement a "full shell" with those libraries as building blocks, much like cmd/gosh does.
As far as cmd/gosh, like you said, it's a bit of a proof of concept and testing tool rather than a complete shell. I think it's a bit overkill to pull in heavier dependencies like readline or tab completion into this module. But writing such a complete shell in a third-party module would certainly be useful.
I woul…