-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Incremental search overlaps long PS1
#2081
Comments
Thanks for the report, I reproduced this ... I'm not sure why this is happening since we are basically just calling GNU readline with a prompt string Maybe we are calling it the wrong way, or maybe it doesn't calculate the width correctly |
Hm this happens in both Python and C++ - the former calls But it doesn't happen in that is odd |
Calling raw_input() doesn't exhibit the bug - it erases the prompt correctly Related to issue #2081
Oh man I tracked this down to
disabling that restores the bash-like behavior I added that in order to fix an issue with line wrapping, and our custom completion UI Gah we are trying to complete in a nicer way than bash, by not re-printing the prompt all the time, but it appears that GNU readline may not support that without bugs I guess we could change the default back to something bash-like, and provide the current behavior as an option (which I like better) |
This is issue #2081 It's due to GNU readline horizontal-scroll-mode Unrelated: cases in spec/builtin-eval-test, with pp frame_vars_
@melvinw Thanks for finding this bug! I am not sure what to do about this, other than downgrade to the bash-like experience, which doesn't use "reuse the prompt line" i.e. zsh and OSH reuse the prompt line, by printing ANSI sequences to go up, whereas bash doesn't I feel that is nicer, but it causes this bug in OSH. (zsh has their own line editor of course; they don't use GNU readline) It could be that GNU readline only correctly supports the bash-like behavior, and that's my suspicion, although I didn't look into it that deeply https://oilshell.zulipchat.com/#narrow/channel/121539-oil-dev/topic/incremental.20search.20bug |
Related issues
not sure if this is still desirable |
So I think the problem is that if we try to do the zsh-like thing, we have either
I'm not sure if there is a way to solve both at once, within the constraints of GNU readline, but it would sure be nice !! If we can't solve both, then I guess we fall back to a bash-like experience as the default? |
When
PS1
is long enough, launching an incremental search doesn’t dismiss the prompt:The prompt goes away entirely only after the length of the search terms exceeds it.
Sometimes, it can linger on like this:
oils-for-unix-0.23.0]# lr _build/oils.shnix-0.23.0]#
The text was updated successfully, but these errors were encountered: