vim-suda
vim-suda copied to clipboard
doas support?
Would you please support doas if you like?
I agree with this.
suda] sudo: invalid option -- 'p'
[suda] usage: doas [-Lns] [-C config] [-u user] command [args]
This is what I receive after inputting my password when running :SudaWrite
, I don't think it'd take much to add it in.
please make this hapeend
Maybe make it use su instead, as that's installed on most if not all systems as far as I know. For example, makepkg uses su if sudo is not found...
Oops. I'm sorry I didn't notice this request. Well, I have no idea what "doas" and I have no idea what to do to support it.
doas is alternative to sudo https://wiki.archlinux.org/title/Doas sudo has the -p option, but doas does not, so symbolic links will not work γγγγγγ°η§γ«ε―Ύγγ¦ζ₯ζ¬θͺγθ©±γγ¦γγ γγ
I've already cloned this project and tried to work on it, but I've hit a "roadblock,", doas doesn't have the flag that sudo does to pass the password to, so you're probably going to use expect or socat or something like that. It's likely not going to be that hard, but maybe it'd be more efficient if it uses something that's essentially really light and exists on all systems that isn't exactly replacable, like maybe the su
util or something more tightly-knit, I'm unsure. Do as you wish, and thank you for listening!
Probably, I'm not going to support doas
or su
in suda.vim (by myself) while suda.vim has technical limitation (#34). Instead, maybe I'll create a new fresh plugin for handle #34 and then I'll consider to support doas
and/or su
.
γγγγγγ°η§γ«ε―Ύγγ¦ζ₯ζ¬θͺγθ©±γγ¦γγ γγ
I'm sorry but it seems some people interested in this topic so I prefer to discuss it with English.
This issue is fixed by #58
@aarondill it's not, sudo-specific -p
and -S
flags are still used by the plugin
@lambdalisue Line 18 of autoload/suda.vim needs to be changed to fully support doas (when a password is needed)
@acid-bong I've looked at the source for doas, and it seems there's no way to pass a password to stdin, instead of requiring a terminal. Changing line 18 (see above) would allow it to work with any programs which read from stdin, but if it attempts to open a tty (like doas), we can only support the no password version.
I'm not certain of any tools for this purpose that do except through stdin, but the above mentioned change would allow them to work by default (after setting the executable variable)
@aarondill a possible solution could be found somewhere in Emacs' tramp.el
(for current stable branch, emacs-28), doas is one of the preconfigured privilege elevation tools in it. I know it does work flawlessly* (except when your default shell is zsh, but that's a different issue), but i'm yet to find out how it passes the password, because it doesn't use -S for sudo
I still don't use doas
so it's a bit hard for me to support it while I've no idea what I need to do so PRs are very welcome to support it.
@aarondill a possible solution could be found somewhere in Emacs'
tramp.el
(for current stable branch, emacs-28), doas is one of the preconfigured privilege elevation tools in it. I know it does work flawlessly* (except when your default shell is zsh, but that's a different issue), but i'm yet to find out how it passes the password, because it doesn't use -S for sudo
Sadly, I can't for the life of me read lisp, especially when it's that abstracted. If you can figure it out, please let me know. My guess would be that emacs allows commands to open a tty when executing (like vim
did), which nvim doesn't (I'm likely misunderstanding the root issue, but still), which is the original reason this plugin was necessary.
With the merging of #60, you can now use doas
only with nopass
configured!