The attached patch adds a pcomplete procedure for doas, so shell/eshell will do command completion correctly.