all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Brian Cully <bjc@spork.org>, 58899@debbugs.gnu.org
Subject: bug#58899: [PATCH v1] Add the "doas" alias to eshell.
Date: Sun, 30 Oct 2022 14:51:26 -0700	[thread overview]
Message-ID: <286825e7-2dc2-9cc7-73a3-1056a249d56f@gmail.com> (raw)
In-Reply-To: <87pme92rge.fsf@ditto.jhoto.spork.org>

On 10/30/2022 9:42 AM, Brian Cully via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> 
> This patch adds a “doas” command alias to eshell for users who prefer
> doas, similar to the existing “su” and “sudo” command aliases.

Thanks. I think this would be a good addition to Eshell.

> I'm unsare whether to use “TRAMP” or “Tramp” spelling. The existing
> routines in the file use the former, but I've been informed the latter
> is correct. A future patch should make all spellings (at least within
> this module) consistent.

I'd say go with "Tramp" like you did in your patch. Since you're 
modifying code near most of the existing usages of "TRAMP", now would 
probably be a good time to fix that everywhere in the file too.

> Additionaly, I've added a function for calculating the remote-path for
> files accessed with doas. This function is currently limited to *only*
> doas, because I didn't want to mess with the other su and sudo
> functions, but there's no reason it can't be shared, and a future patch
> should implement that sharing if this patch is considered desirable.

Since the 'eshell/doas' and 'eshell/sudo' functions are so similar, I 
definitely think it would make sense to share as much code as possible 
here. In particular, you could also add support for "--shell" to 
'eshell/sudo'.

There are some existing tests in test/lisp/eshell/em-tramp-tests.el, so 
I think it should be fairly safe to adjust 'eshell/sudo'; the regression 
tests should catch any problems. (Well ok, *some* problems.) It would 
probably be good to add some simple tests for 'eshell/doas' too.





  reply	other threads:[~2022-10-30 21:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 16:42 bug#58899: [PATCH v1] Add the "doas" alias to eshell Brian Cully via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-30 21:51 ` Jim Porter [this message]
2022-10-30 22:06   ` Jim Porter
2022-10-31 12:36     ` Eli Zaretskii
2022-10-31  8:16   ` Michael Albinus
2022-10-31 16:01   ` Brian Cully via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-31 18:01     ` Eli Zaretskii
2022-10-31 18:29       ` Brian Cully via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-03 17:09         ` Jim Porter
2022-11-03 20:24           ` Brian Cully via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-05 19:10             ` Jim Porter

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=286825e7-2dc2-9cc7-73a3-1056a249d56f@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=58899@debbugs.gnu.org \
    --cc=bjc@spork.org \
    /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.