I report again a bug that repeated to me many times;
I have a shell opened , and even if I am in the directory /x/y/z, when I press <TAB>, it
expands the completion from the directory "X", not from Z, as expected.
To me TAB executes so:
TAB (translated from <tab>) runs the command comint-dynamic-complete
Inside comint-dynamic-complete, one executes the hook
comint-dynamic-complete-functions, which are
(comint-replace-by-expanded-history comint-dynamic-complete-filename)
I will keep the session opened, and maybe somebody tells me what to report more
than that.