Skip to content

cmds/core/gosh: reintroduce nocomp mode without bubbline#2685

Merged
MDr164 merged 4 commits into
u-root:mainfrom
MDr164:unlcutter_gosh
Jun 22, 2023
Merged

cmds/core/gosh: reintroduce nocomp mode without bubbline#2685
MDr164 merged 4 commits into
u-root:mainfrom
MDr164:unlcutter_gosh

Conversation

@MDr164
Copy link
Copy Markdown
Contributor

@MDr164 MDr164 commented May 26, 2023

It showed that this library causes quite a few issues in automated test, so the default will be the plain sh interactive mode which is much more slimmed down. Bubbline can be enabled during runtime still using the comp flag.

@MDr164 MDr164 requested a review from rminnich May 26, 2023 09:06
@rminnich
Copy link
Copy Markdown
Member

it turned out completion was not the only issue, which is why I renamed things. bubbline insists on putting out all this ansi foo, for its fancy prompts and such, and that caused trouble for testing scripts. Also there was the size issue.

So, I'd suggest it is not about completion, it is about complexity, and I like your use of the name simple.

We ought to find a way to integrate this with the stuff I upstreamed already. One question, though: the code I upstreamed works. Given that, what is the extra value of this PR? What am I missing?

@MDr164
Copy link
Copy Markdown
Contributor Author

MDr164 commented May 30, 2023

I was ooo yesterday. I already thought of a way integrating your change. Let me rebase this PR so we can choose between bubbline and no editline implementation for automated testing via a fleg/env var without any regression in shell parsing functionality.

@jelischer
Copy link
Copy Markdown
Contributor

I have implemented a change within google that does this but using the old "prompt" code in our copy.
I will try put it here for reference:
I used the termios package, though it required one tiny change to be useable with gosh as a root shell.
(ability to take an existing os.file and 'wrap' it as a TTYIO)

@MDr164 MDr164 force-pushed the unlcutter_gosh branch 2 times, most recently from d012211 to 4301816 Compare June 20, 2023 11:25
MDr164 added 2 commits June 20, 2023 13:45
It showed that this library causes quite a few issues in automated
test, so the default will be the plain sh interactive mode which
is much more slimmed down. Bubbline can be enabled during
runtime still using the comp flag.

Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
Signed-off-by: Marvin Drees <marvin.drees@9elements.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 20, 2023

Codecov Report

Patch coverage: 4.54% and project coverage change: -0.09 ⚠️

Comparison is base (59189ff) 75.43% compared to head (8b20f9b) 75.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2685      +/-   ##
==========================================
- Coverage   75.43%   75.34%   -0.09%     
==========================================
  Files         414      414              
  Lines       42168    42205      +37     
==========================================
- Hits        31810    31800      -10     
- Misses      10358    10405      +47     
Impacted Files Coverage Δ
cmds/core/gosh/gosh.go 23.80% <4.54%> (-9.90%) ⬇️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MDr164 MDr164 added the Awaiting reviewer Waiting for a reviewer. label Jun 20, 2023
Copy link
Copy Markdown
Member

@rminnich rminnich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks a lot better than what I did.

@rminnich
Copy link
Copy Markdown
Member

it appears you want to do more, and now I wonder:
can we get rid of vendor/ yet
I am going to try

@MDr164 MDr164 merged commit a9bebcc into u-root:main Jun 22, 2023
@MDr164 MDr164 deleted the unlcutter_gosh branch June 22, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting reviewer Waiting for a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants