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

(FL) Fix readline crash when using autocomplete with colored-completion-prefix turned on in Bash #2991

Merged
merged 2 commits into from
Nov 13, 2018

Conversation

frankluebeck
Copy link
Member

This is an alternative for the pull request "Fix readline crash" #2986 by @ChrisJefferson.

@ChrisJefferson: Thanks for the report! I very rarely had crashes from completions before (also without the 'colored-completion-prefix' switch of readline, but could never reproduce them.

I agree that your proposed fix (#2986) should avoid the crashes, but as you already mentioned, the 'colored-completion-prefix' switch does not yet work. This should be fixed by the present patch.

A second commit also fixes the problem that GAP did not read a '$if GAP' section of '~/.inputrc' on startup.

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).
Make sure that
  rl_readline_name = "GAP"
is set before the
  rl_initialize();
initialization of readline. Otherwise GAP specific settings in
~/.inputrc under

$if GAP
  ...
$endif

are not read at startup.
@ChrisJefferson
Copy link
Contributor

Thanks, this is much better than my PR.

@codecov
Copy link

codecov bot commented Nov 11, 2018

Codecov Report

Merging #2991 into master will decrease coverage by <.01%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #2991      +/-   ##
==========================================
- Coverage   85.21%   85.21%   -0.01%     
==========================================
  Files         110      110              
  Lines       56857    56859       +2     
==========================================
+ Hits        48450    48451       +1     
- Misses       8407     8408       +1
Impacted Files Coverage Δ
src/sysfiles.c 40.59% <0%> (-0.03%) ⬇️
src/system.c 69.72% <100%> (+0.09%) ⬆️

@markuspf markuspf added kind: bug: crash Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes) release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes backport-to-4.10 labels Nov 12, 2018
@fingolfin fingolfin merged commit ede012b into gap-system:master Nov 13, 2018
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.1 milestone Nov 24, 2018
@olexandr-konovalov olexandr-konovalov added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 23, 2019
@olexandr-konovalov olexandr-konovalov changed the title Fl readline fix (FL) Fix readline crash when using autocomplete with colored-completion-prefix turned on in Bash Feb 23, 2019
@olexandr-konovalov
Copy link
Member

Backported in 4c26a9c and 4191f41

@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.10-DONE 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 release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants