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
ag
consistent withls
,man
, etc. in respect to tilde expansion to home directory path. Do not replace~
by/home/user
in response to[Tab]
in the following cases:Completion of file names is still handled by
_filedir
. As to other utilities, e.g.ls
uses_longopt
function that does not call_expand
at all, whileman
has call of_expand
but 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-expand
command) 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
_filedir
is not enough and_expand
is really necessary.