[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in rl_filename_completion_function (with patch!)
From: |
Chet Ramey |
Subject: |
Re: Bug in rl_filename_completion_function (with patch!) |
Date: |
Wed, 26 Oct 2022 15:12:42 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 |
On 10/25/22 3:51 AM, Stefan H. Holek wrote:
Hi All,
There is an issue that has been bothering me for quite some time now, and that
I finally got to the bottom of. It concerns the dirname passed to opendir in
rl_filename_completion_function (complete.c).
If the dirname requires tilde expansion it is expanded, and if it requires
dequoting it is dequoted. However, if a dirname requires BOTH tilde expansion
AND dequoting (e.g.: ~stefan/funny\ dir/) only the former is performed and
filename completion fails as a result.
This can be handled by rl_directory_rewrite_hook or
rl_directory_completion_hook -- that's why it works in bash -- but I agree
with your change if the calling application doesn't supply either.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/