I have no objections to the expanded directory name being passed to the hook ;-). Thing is, however, that when a directory_completion_hook is set (even if it does nothing), the expanded directory name is also inserted into the line. I would not expect the latter when I (as a user) have set expand-tilde off.

The relevant rl_filename_completion_function snippet is:

if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname))
        {
          free (users_dirname);
          users_dirname = savestring (dirname);
        }

Thanks,
Stefan


On 17.03.2010, at 21:57, Chet Ramey wrote:

Yes, exactly.

Readline performs tilde expansion before passing filenames to hook functions
because the calling application may not be capable of doing so.

The `expand-tilde' setting is for users to control, not for application hooks. No, there's no good way for a calling application to indicate that
it wants to do its own tilde processing.

Chet


--
Stefan H. Holek
[email protected]







_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to