GNU bug report logs -
#64546
30.0.50; [PATCH] Add support for explicitly-remote commands in Eshell
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Sun, 9 Jul 2023 19:32:01 UTC
Severity: normal
Tags: patch
Found in version 30.0.50
Done: Jim Porter <jporterbugs <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 64546 in the body.
You can then email your comments to 64546 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Sun, 09 Jul 2023 19:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 09 Jul 2023 19:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This patch adds the ability to run a command in Eshell from any host, no
matter your current directory. For example, you could run
"/ssh:user <at> remote:whoami" from a local dir, which would run "whoami"
over the SSH connection for "user <at> remote". Similarly, you could run
"/:whoami" to run the local "whoami" even from a remote dir. (The latter
syntax is just piggybacking off of quoted file names, which otherwise
have no special meaning in Eshell.)
Prior to the main patch, I also added a bit of documentation about how
remote access works in Eshell. These are separate commits so that, if we
wanted, we could backport the first patch to the Emacs 29 branch.
[0001-Add-documentation-about-remote-access-in-Eshell.patch (text/plain, attachment)]
[0002-Add-support-for-explicitly-remote-commands-in-Eshell.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 07:26:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 64546 <at> debbugs.gnu.org (full text, mbox):
Jim Porter <jporterbugs <at> gmail.com> writes:
Hi Jim,
> This patch adds the ability to run a command in Eshell from any host,
> no matter your current directory. For example, you could run
> "/ssh:user <at> remote:whoami" from a local dir, which would run "whoami"
> over the SSH connection for "user <at> remote".
Looks nice. But what if I want to run a command on another remote host
with an absolute path? Would "/ssh:user <at> remote:/usr/bin/whoami" also be
possible?
> Similarly, you could run "/:whoami" to run the local "whoami" even
> from a remote dir.
The same question. What about calling "/:/usr/bin/whoami"?
> +By default, commands like @code{ssh} and @code{sudo} use the external
> +programs by those names, so if you ran @samp{ssh
> +@var{user}@@@var{remote}}, you would end up in the default shell
> +program for @var{user} on @var{remote}, @emph{not} in Eshell. If you
> +prefer to use commands like @code{ssh} but remain in Eshell
> +afterwards, you can enable the optional Tramp extensions (@pxref{Tramp
> +extensions}).
This surprises me. I thought, that only "doas", "su" and "sudo" are built-ins.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 12:05:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 64546 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 9 Jul 2023 12:31:04 -0700
> From: Jim Porter <jporterbugs <at> gmail.com>
>
> This patch adds the ability to run a command in Eshell from any host, no
> matter your current directory. For example, you could run
> "/ssh:user <at> remote:whoami" from a local dir, which would run "whoami"
> over the SSH connection for "user <at> remote". Similarly, you could run
> "/:whoami" to run the local "whoami" even from a remote dir. (The latter
> syntax is just piggybacking off of quoted file names, which otherwise
> have no special meaning in Eshell.)
>
> Prior to the main patch, I also added a bit of documentation about how
> remote access works in Eshell. These are separate commits so that, if we
> wanted, we could backport the first patch to the Emacs 29 branch.
Documentation improvements and fixes are always welcome on the release
branch, as long as they describe the behavior of the branch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 16:54:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 64546 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 7/10/2023 12:24 AM, Michael Albinus wrote:
> Jim Porter <jporterbugs <at> gmail.com> writes:
>> This patch adds the ability to run a command in Eshell from any host,
>> no matter your current directory. For example, you could run
>> "/ssh:user <at> remote:whoami" from a local dir, which would run "whoami"
>> over the SSH connection for "user <at> remote".
>
> Looks nice. But what if I want to run a command on another remote host
> with an absolute path? Would "/ssh:user <at> remote:/usr/bin/whoami" also be
> possible?
Yes, the local part should let you type any command name that would work
if you were in the home directory[1] for that connection. I'll also add
a note about that to the manual (and a regression test).
> The same question. What about calling "/:/usr/bin/whoami"?
Ditto.
>> +By default, commands like @code{ssh} and @code{sudo} use the external
>> +programs by those names, so if you ran @samp{ssh
>> +@var{user}@@@var{remote}}, you would end up in the default shell
>> +program for @var{user} on @var{remote}, @emph{not} in Eshell. If you
>> +prefer to use commands like @code{ssh} but remain in Eshell
>> +afterwards, you can enable the optional Tramp extensions (@pxref{Tramp
>> +extensions}).
>
> This surprises me. I thought, that only "doas", "su" and "sudo" are built-ins.
Oops! Somehow, I got it into my head that we had an 'eshell/ssh'
builtin, but that's not the case. I'll just remove this paragraph.
[1] Well, whatever the default directory is if you ran "cd
/method:user <at> host:", anyway. Personally, I'd avoid trying to use
relative paths though; I think that's a bit confusing.
[0001-Add-documentation-about-remote-access-in-Eshell.patch (text/plain, attachment)]
[0002-Add-support-for-explicitly-remote-commands-in-Eshell.patch (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 17:39:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 64546 <at> debbugs.gnu.org (full text, mbox):
Jim Porter <jporterbugs <at> gmail.com> writes:
Hi Jim,
>> This surprises me. I thought, that only "doas", "su" and "sudo" are
>> built-ins.
>
> Oops! Somehow, I got it into my head that we had an 'eshell/ssh'
> builtin, but that's not the case. I'll just remove this paragraph.
Thanks.
Since a while, I have the feeling we would need only 'doas' and 'sudo'
as built-in, in order to apply 'sudo COMMAND' or so. 'su' isn't needed,
it is equivalent to 'cd /su::'. But I don't know whether we shall remove
it; people might have adapted their workflow to use it.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 17:55:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 64546 <at> debbugs.gnu.org (full text, mbox):
On 7/10/2023 10:38 AM, Michael Albinus wrote:
> Since a while, I have the feeling we would need only 'doas' and 'sudo'
> as built-in, in order to apply 'sudo COMMAND' or so. 'su' isn't needed,
> it is equivalent to 'cd /su::'. But I don't know whether we shall remove
> it; people might have adapted their workflow to use it.
Hmm, maybe a user option like 'eshell-tramp-enable-subshell-commands'?
Then we could add 'eshell/ssh' as well, and turn that on/off along with
'eshell/su' with that option.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64546
; Package
emacs
.
(Mon, 10 Jul 2023 19:04:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 64546 <at> debbugs.gnu.org (full text, mbox):
Jim Porter <jporterbugs <at> gmail.com> writes:
Hi Jim,
>> Since a while, I have the feeling we would need only 'doas' and 'sudo'
>> as built-in, in order to apply 'sudo COMMAND' or so. 'su' isn't needed,
>> it is equivalent to 'cd /su::'. But I don't know whether we shall remove
>> it; people might have adapted their workflow to use it.
>
> Hmm, maybe a user option like 'eshell-tramp-enable-subshell-commands'?
> Then we could add 'eshell/ssh' as well, and turn that on/off along
> with 'eshell/su' with that option.
That makes sense, yes.
Best regards, Michael.
Reply sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
You have taken responsibility.
(Mon, 10 Jul 2023 19:33:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jim Porter <jporterbugs <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 10 Jul 2023 19:33:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 64546-done <at> debbugs.gnu.org (full text, mbox):
Merged these patches to master as a6e88dc7269, so closing this bug now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 08 Aug 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.