This commit is contained in:
Barinderpreet Singh 2026-05-18 10:08:38 +02:00 committed by GitHub
commit 43d32a9dc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,7 +78,7 @@ sudo-command-line() {
# - $realcmd is "cmd" and $EDITOR is /alternative/path/to/cmd that appears in $PATH
if [[ "$realcmd" = (\$EDITOR|$editorcmd|${editorcmd:c}) \
|| "${realcmd:c}" = ($editorcmd|${editorcmd:c}) ]] \
|| builtin which -a "$realcmd" | command grep -Fx -q "$editorcmd"; then
|| builtin which -a "$realcmd" | command grep -Fx -q -- "$editorcmd"; then
__sudo-replace-buffer "$cmd" "sudo -e"
return
fi