Steps to reproduce: ```elisp (ghostel-eshell-visual-command-mode +1) (eshell) ; $ cd /ssh:remote: # or /sudo:: ; /ssh:remote: $ tmux ; Selecting deleted buffer ; /ssh:remote: $ ``` I have in mind something like that: (it works for me) ```elisp (defun ghostel-eshell--exec-visual (&rest args) "Replacement for `eshell-exec-visual' that dispatches to ghostel. ARGS are the program name followed by its arguments, as passed by eshell." (require 'esh-ext) (require 'esh-util) (save-current-buffer (let* ((eshell-interpreter-alist nil) (interp (eshell-find-interpreter (car args) (cdr args))) (program (car interp)) (prog-args (flatten-tree (eshell-stringify-list (append (cdr interp) (cdr args))))) (buf (generate-new-buffer (concat "*" (file-name-nondirectory program) "*")))) (switch-to-buffer buf) ;; here: (let ((default-directory (file-name-directory program)) (program (if (file-remote-p program) (tramp-file-name-localname (tramp-dissect-file-name program)) program))) ;; end (ghostel-exec buf program prog-args `((kind . eshell) (command . (,program . ,prog-args))))) (with-current-buffer buf (setq-local ghostel-kill-buffer-on-exit (bound-and-true-p eshell-destroy-buffer-when-process-dies)) (setq-local ghostel-buffer-name-function (and ghostel-eshell-track-title #'ghostel-buffer-name-by-title)) (add-hook 'ghostel-exit-functions #'ghostel-eshell--visual-exit nil t)) nil))) ```
Activity
dakra commentedon Sep 16, 2026
Thanks for reporting. Fixed on main.
mobid commentedon Sep 16, 2026
Thanks. Works fine now.
Run eshell visual commands from TRAMP directories