bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

Adding doas support.

Open Scupake opened this issue 3 years ago • 10 comments

Can someone please add support for doas?

Scupake avatar Mar 03 '21 19:03 Scupake

Have you asked if upstream doas project would be interested int creating or maintaining one?

scop avatar Mar 06 '21 06:03 scop

No, I haven't, I guess I could open an issue for OpenDoas, which is the version used in Void, Debian, Ubuntu and Gentoo.

Scupake avatar Mar 06 '21 12:03 Scupake

Can someone please add support for doas?

Just copy sudo file from completions directory and rename it to doas. Then search and replace all occurrences of sudo in this file with doas. Wait for a proper solution :)

chunzu avatar Apr 05 '21 20:04 chunzu

That helps some, but not with completion for apt in Debian. Do you have an idea how to work around that?

fethomm avatar Jun 13 '21 11:06 fethomm

Hello. I'm on Debian as well. Completion for apt commands work fine.

This is my /etc/doas.conf: permit keepenv nopass USER as root

Without "keepenv" you can't start GUI applications. But even with this, there are some errors about DBUS and others. So please do not launch GUIs as it can break your system.

Also on a second line of doas completion file, add this: PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin

To fix "command not found" error for programs in /usr/sbin.

Sorry, I can not help you more than this. We have to wait when somebody implements it.

chunzu avatar Jun 14 '21 21:06 chunzu

Thanks, that helped!

fethomm avatar Jun 15 '21 07:06 fethomm

Opendoas' maintainer has said in a reddit comment that they won't add any feature unless it is in upstream doas, which is unlikely to add bash support because iirc they use ksh on openbsd

Scupake avatar Jul 20 '21 00:07 Scupake

OpenBSD has bash-completion in their ports tree, https://openports.se/shells/bash-completion

scop avatar Sep 02 '21 21:09 scop

Ref. PR https://github.com/Duncaen/OpenDoas/pull/84 in OpenDoas

akinomyoga avatar Feb 20 '23 14:02 akinomyoga

you can get completion by symlinking doas as sudo if you only use doas example : doas ln -s /usr/bin/doas $HOME/.local/bin/sudo

kzwkt avatar Feb 27 '23 10:02 kzwkt