Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bash completion if colon is in the word to complete
Word completion may behave improperly if there is a colon in the word to be completed. The colon can be special to readline's word completion code: it can be one of the characters that breaks words for the completer. The current set of completion word break characters is available in bash as the value of the COMP_WORDBREAKS variable. Removing ':' from that value is enough to make the colon not special to completion: COMP_WORDBREAKS=${COMP_WORDBREAKS//:} This fix is workaround for cases where ':' is a break character (it is contained in COMP_WORDBREAKS). A side effect in this case is the removal of the prefix containing the colon in the list of bash completion suggestions.
- Loading branch information