emacs-helm / helm

Emacs incremental completion and selection narrowing framework
https://emacs-helm.github.io/helm/
GNU General Public License v3.0
3.37k stars 390 forks source link

helm-find-files not working with tramp multihop syntax when using `helm-list-dir-external`. #2080

Closed thierryvolpiatto closed 6 years ago

thierryvolpiatto commented 6 years ago

Expected behavior

helm-find-files working with tramp multihop syntax when using helm-list-dir-external as helm-list-directory-function.

Actual behavior (from emacs-helm.sh if possible, see note at the bottom)

helm-find-files with tramp multihop syntax is working only with helm-list-dir-lisp as helm-list-directory-function but failing to list directory when using helm-list-dir-external (the default function).

AFAIU the bug is not a helm bug but a bug in process-file-shell-command which doesn't support tramp multihop syntax, however it is working fine when using tramp-default-proxies-alist.

Steps to reproduce (recipe)

C-x C-f /ssh:host|sudo:host:

Backtraces if any (M-x toggle-debug-on-error)

No backtraces.

Describe versions of Helm, Emacs, operating system, etc.

Master branch of helm and tested on emacs 25/26/27.

Are you using emacs-helm.sh to reproduce this bug (yes/no):

yes

thierryvolpiatto commented 6 years ago

See #1598

thierryvolpiatto commented 6 years ago

So for now if one really want to use tramp multihop, the alternative is to use tramp-default-proxies-alist or to use the lisp function instead of the external one:

(setq helm-list-directory-function #'helm-list-dir-lisp)

thierryvolpiatto commented 6 years ago

Finally found what's wrong, the default-directory needs to be shell-quoted when passed to process-file-shell-command.

ngleb commented 6 years ago

Hello Thierry!

That was fast, I didn't even have time to check the previous version. I can confirm that this is now working as expected, and all completions are shown correctly. Thanks!