Skip to content

Minimal shell with tab completion #778

Answered by mvdan
MDr164 asked this question in Q&A
Dec 15, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@MDr164
Comment options

@mvdan
Comment options

@mvdan
Comment options

@MDr164
Comment options

Answer selected by MDr164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants