Possibly you have $VISUAL
set to vim
as well, and vipw
/vigr
(at least the ones in the passwd
package on Debian) uses that instead of $EDITOR
if both are set (like most applications do), so:
VISUAL='vim -u NONE' vigr
Should do it as long as your vipw
/vigr
like Debian's expects that to be sh
code (runs sh -c -- <that-code-concatenated-with-" /etc/group.edit">
) instead of the name or path of an editor executable (to call with /etc/group.edit
as argument)¹.
From the Debian man page for vipw
/vigr
:
When looking for an editor, the programs will first try the environment variable $VISUAL
, then the environment variable $EDITOR
, and finally the default editor, vi(1).
¹ Most of the time, $VISUAL
/$EDITOR
are intended as code passed to sh
(that's what Debian's environ(7) man page specifies). In my experience, other possibilities are code passed to $SHELL
(see also less
which upon v
runs sh
(possibly via system(3)
) to run $SHELL
to interpret the code), or the program will do a shell-like tokenising of it, skipping the call to a shell and avoid doing other forms of shell expansions/interpretation, or expect the name or path of an editor only and don't run any shell (for mailx
, POSIX specifies $EDITOR
is meant to be an editor name, and $VISUAL
an editor pathname, I doubt many implementations honour that).