Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flakiness in devtools/completion.bash #797

Open
andychu opened this issue Jul 24, 2020 · 2 comments
Open

flakiness in devtools/completion.bash #797

andychu opened this issue Jul 24, 2020 · 2 comments

Comments

@andychu
Copy link
Contributor

andychu commented Jul 24, 2020

OK this is actually trivial: just source devtools/completion.bash

https://oilshell.zulipchat.com/#narrow/stream/121539-oil-dev/topic/oil-dev.20completion

Maybe I should call it devtools/oil-dev.bash ?

Originally posted by @andychu in #99 (comment)

@andychu
Copy link
Contributor Author

andychu commented Jul 24, 2020

Repro in BOTH bash and OSH !!

build/dev.sh m<TAB>     # this works, completes 'minimal'

build/dev.sh minimal <TAB>  # try to complete a second word

# now backspace

build/dev.sh m<TAB>   # no longer works!!!

I don't understand why this is. But I think it's because the complex case statements in devtools/completion.bash are wrong.

@andychu
Copy link
Contributor Author

andychu commented Jul 24, 2020

Possible Strategy: instead of fixing this bug in old code that I don't particularly like, maybe develop some simpler Oil API and use that? rewrite the whole thing?

Functionality:

  • completes the first word
  • completes unit tests after the unit action.

This should be done by some more obvious pattern matching?


Other notes: there is some weirdness about how this composes with Debian's bash-completion. I remember there was a bug where I took over *.sh and that broke some debian stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant