bash completion: do not expand tilde #1495
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make behavior of bash completion for
agconsistent withls,man, etc. in respect to tilde expansion to home directory path. Do not replace~by/home/userin response to[Tab]in the following cases:Completion of file names is still handled by
_filedir. As to other utilities, e.g.lsuses_longoptfunction that does not call_expandat all, whilemanhas call of_expandbut it is bypassed for file names.Expansion of
~is controlled by the following setting ininputrc:For details see info "(bash) Readline Init File Syntax". Alternatively
M-&(tilde-expandcommand) may be used to expand tilde at particular point info "(bash) Miscellaneous Commands".If you are going to revert this commit, please, add a comment with an example when
_filediris not enough and_expandis really necessary.