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

Fix readline crash when using autocomplete with colored-completion-prefix turned on in Bash #2986

Closed

Conversation

ChrisJefferson
Copy link
Contributor

This stops readline crashing if set colored-completion-prefix on
is in ~/.inputrc. However, it doesn't make that option work, as
(I believe) the first thing passed to rl_display_match_list should
be the current partially written word.

I am not going to further improve this PR, but I am happy or someone else to, or for it to be merged as is so at least we don't crash.

src/sysfiles.c Outdated Show resolved Hide resolved
This stops readline crashing if set colored-completion-prefix on
is in ~/.inputrc. However, it doesn't make that option work, as
(I believe) the first thing passed to rl_display_match_list should
be the current partially written word
@fingolfin fingolfin added kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) topic: kernel release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Nov 10, 2018
@fingolfin
Copy link
Member

This code was originally written by @frankluebeck so perhaps he has further comments or insights? Otherwise, I'd just merge this next week.

frankluebeck added a commit to frankluebeck/gap that referenced this pull request Nov 11, 2018
This was reported including a first proposed fix by @ChrisJefferson
("Fix readline crash" gap-system#2986 in github.)

With this patch the ~/.inputrc setting

set colored-completion-prefix on

should be supported correctly (by giving the word to be completed to
readline's display function).
@frankluebeck
Copy link
Member

See "Fl readline fix" (#2991) for a comment and an alternative pull request.

@ChrisJefferson
Copy link
Contributor Author

closed because #2991 is better

fingolfin pushed a commit that referenced this pull request Nov 13, 2018
This was reported including a first proposed fix by @ChrisJefferson
("Fix readline crash" #2986 in github.)

With this patch the ~/.inputrc setting

set colored-completion-prefix on

should be supported correctly (by giving the word to be completed to
readline's display function).
olexandr-konovalov pushed a commit that referenced this pull request Nov 24, 2018
This was reported including a first proposed fix by @ChrisJefferson
("Fix readline crash" #2986 in github.)

With this patch the ~/.inputrc setting

set colored-completion-prefix on

should be supported correctly (by giving the word to be completed to
readline's display function).
@ChrisJefferson ChrisJefferson deleted the readline-fix branch January 20, 2019 13:24
@olexandr-konovalov olexandr-konovalov changed the title Fix readline crash Fix readline crash when using autocomplete with colored-completion-prefix turned on in Bash Feb 23, 2019
@olexandr-konovalov olexandr-konovalov modified the milestone: GAP 4.10.1 Feb 23, 2019
@olexandr-konovalov olexandr-konovalov removed the release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes label Feb 23, 2019
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
ssiccha pushed a commit to ssiccha/gap that referenced this pull request Mar 27, 2019
This was reported including a first proposed fix by @ChrisJefferson
("Fix readline crash" gap-system#2986 in github.)

With this patch the ~/.inputrc setting

set colored-completion-prefix on

should be supported correctly (by giving the word to be completed to
readline's display function).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) kind: bug Issues describing general bugs, and PRs fixing them topic: kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants