GNU bug report logs -
#5072
23.1.50; Eshell fail with sudo command
Previous Next
Full log
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> I've added recently an eshell implementation for su and sudo, using
>> Tramp. This requires to run bash, indeed.
>
> What is the advantage?
Imagine, you are on a remote machine, and you want to call a Lisp
function, accessing a file with root permissions. In eshell, you do:
~ $ cd /ssh:user <at> remotehost:/etc
/ssh:user <at> remotehost:/etc $ sudo find-file shadow
>> In order to keep your original behaviour, you shall call
>> ,----
>> | *sudo emerge -av somepackage
>> `----
>
> Couldn't your code fail more gracefully and transparently fallback on
> running the bare `sudo'?
That is the eshell built-in approach to suppress command emulation. You
can also apply it to "ls" or "du" or whatever command available in
eshell implementation(1). I wouldn't change it; eshell users know this
approach, likely (2).
Maybe more useful would be to improve Tramp, calling a command via
start-file-process directly (without opening a shell first). This is
already on my todo list, but it isn't simple; it needs basic changes.
At least I will move the eshell related information in etc/NEWS to the
"user visible changes" section.
(1): Check for "eshell/*" Lisp functions.
(2): eshell documentation is very poor. Even this is not documented; I
will improve it next days.
> Stefan
Best regards, Michael.
This bug report was last modified 15 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.