From: Ruijie Yu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: michael.albinus@gmx.de, 60722@debbugs.gnu.org
Subject: bug#60722: 30.0.50; [PATCH] Using Tramp to sudo in Eshell doesn't change prompt sigil
Date: Tue, 10 Jan 2023 20:12:54 -0600 [thread overview]
Message-ID: <sdvfsch23xi.fsf@fw.net.yu> (raw)
In-Reply-To: <e92b71ba-6618-6b43-29a8-7dac35cb06a9@gmail.com>
Jim Porter <jporterbugs@gmail.com> writes:
> X-Debbugs-Cc: michael.albinus@gmx.de
>
> Starting with "sudo emacs -Q -f eshell", notice that the prompt looks like:
>
> /home/user #
>
> Now start "emacs -Q -f eshell":
>
> ~ $ cd /sudo::
> /sudo:root@huginn:~ $
>
> Notice that the prompt sigil is still "$" instead of "#". I think it would be
> better to indicate that you have a root shell by using "#" here.
>
> Attached is a patch to do this. It adds a new function, 'user-uid-for-file',
> which is aware of file name handlers. Then, Tramp adds the appropriate
> handler. Now, Eshell can use that function and we get the prompt sigil we
> expect.
>
> [2. text/plain; 0001-Add-user-uid-for-file-to-get-the-effective-UID-for-r.patch]...
Haven't looked into the patch, but I wonder if it addresses multi-hop
scenarios like the following:
1. /sudo:admin@localhost|sudo::
2. /sudo:|sudo:another_user@localhost::
3. /sshx:admin@remote|sudo::
4. /sudo:|sshx:admin@remote::
5. /doas::
6. /sshx:root@localhost:
Best,
RY
next prev parent reply other threads:[~2023-01-11 2:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 23:50 bug#60722: 30.0.50; [PATCH] Using Tramp to sudo in Eshell doesn't change prompt sigil Jim Porter
2023-01-11 2:12 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-11 9:35 ` Michael Albinus
2023-01-11 9:33 ` Michael Albinus
2023-01-11 13:59 ` Michael Albinus
2023-01-14 21:59 ` Jim Porter
2023-01-14 22:10 ` Jim Porter
2023-01-15 9:23 ` Michael Albinus
2023-01-16 5:38 ` Jim Porter
2023-01-16 9:09 ` Michael Albinus
2023-01-17 1:21 ` Jim Porter
2023-01-17 9:12 ` Michael Albinus
2023-01-18 1:04 ` Jim Porter
2023-01-17 15:03 ` Michael Albinus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sdvfsch23xi.fsf@fw.net.yu \
--to=bug-gnu-emacs@gnu.org \
--cc=60722@debbugs.gnu.org \
--cc=jporterbugs@gmail.com \
--cc=michael.albinus@gmx.de \
--cc=ruijie@netyu.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.