Closed leha-bot closed 3 months ago
I can not reproduce the issue in my setup. cmake, then tab does not show any error. Please make sure all the packages are updated with apt update; apt upgrade
command.
I found that CMake requires the '_split_longopt' function which was provided by bash-completion package before 2.12. In the latest release this function has name '_comp__split_longopt'
I think the autocompletion has been broken after bash-completion upgrade from 2.11 to 2.12 , according to the diff between 2.12 and 2.11: https://github.com/scop/bash-completion/compare/2.12.0..2.11
I fixed this bug via replacing old name in $TERMUX/usr/share/bash-completion/completions/cmake
I may send a PR with patch, if don't mind.
I also planning to fix it properly in upstream CMake
(Since I'm set as the maintainer for the bash-completion
package I guess I should chime in.)
We could definitely patch the completion until the issue is fixed upstream (be that in cmake or bash-completion)
But that would more so be a band-aid fix.
What confuses me is that the behavior doesn't appear to be replicable though. I'll test this myself later.
Oh, my bad. I assumed that bash-completion is installed already. I can reproduce the issue after installing bash-completion package manually. :bow:
Yep, I can also reproduce this and have already identified the issue.
A simple API breakage due to a renamed function in the main bash-completion
script.
https://github.com/scop/bash-completion/blob/master/bash_completion#L760-L786
Should be trivial to patch, I'll see if there's already a PR upstream.
The upstream will seems to fix it a proper way here: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9564 Waiting for merging and CMake 3.30 😊
This should be fixed in cmake version 3.30.0 and above.
Problem description
After some recent updates cmake autocompletion in Bash became to print the '_split_longopt: command not found'.
After some searching I found some issues in CMake and another autocompletion issue in "bat" repo:
The latter suggests possible cause for their similar issue.
What steps will reproduce the bug?
cmake
in bash terminalWhat is the expected behavior?
It works without error.
System information
termux-info: