Repository navigation
Run eshell visual commands from TRAMP directories - #694
Merged
Merged
Conversation
`eshell-find-interpreter' resolves a command on a remote directory to a TRAMP-prefixed path, which was passed verbatim to the remote shell's exec. `ghostel--spawn-process' now strips it to the local name for remote spawns. The eshell wrapper set `ghostel-kill-buffer-on-exit' only after `ghostel-exec' returned, so an exit processed while TRAMP was still spawning killed the buffer with the global default and the following `with-current-buffer' failed with "Selecting deleted buffer". The setting is let-bound around the spawn, and a buffer whose child already exited gets its exit handling applied directly. Fixes #693
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #693.
eshell-find-interpreterresolves a command on a remotedefault-directoryto a TRAMP-prefixed path such as/ssh:remote:/usr/bin/tmux.ghostel--spawn-processpassed that verbatim into the remote/bin/sh -c '...; exec PROGRAM'wrapper, so the remote shell failed with "No such file or directory" (exit 126). The remote branch now strips the program to its local name, which covers every caller.The "Selecting deleted buffer" message came from a second problem in the eshell wrapper:
ghostel-kill-buffer-on-exitwas only set buffer-locally afterghostel-execreturned. When TRAMP processed the immediate exit while still insidemake-process, the sentinel killed the buffer with the global default and the followingwith-current-bufferfailed. The setting is now let-bound around the spawn, and a buffer whose child already exited gets its exit handling (theqdismiss binding) applied directly.Reproduced and verified with TRAMP's
mockmethod. Not tested against a real ssh host.