Code:
% cat /usr/local/etc/doas.conf
permit nopass keepenv fbsd as root
permit nopass keepenv root as root
% id -nu
fbsd
% doas id -nu
root
% echo $SHELL
/usr/local/bin/zsh
% doas echo $SHELL
/usr/local/bin/zsh
% alias
vi=vim
% doas alias
%
% doas -s
# alias
vi=vim
As this shows, doas doesn't know any alias, so "doas vi" can't invoke installed vim. Now I have to run "doas -s" in a tmux window and stay it for alias requirements.
Is this reasonable or just my mistake? How to enable zsh alias for doas? Thanks!