From cc9b75ace7fc3781da226a45fcfee3ace72642d3 Mon Sep 17 00:00:00 2001 From: Barinderpreet Singh <64461700+knownasnaffy@users.noreply.github.com> Date: Thu, 7 May 2026 22:23:20 +0530 Subject: [PATCH] fix(sudo): modify grep command to handle special characters in editorcmd --- plugins/sudo/sudo.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh index 66b253fe7..9c709279a 100644 --- a/plugins/sudo/sudo.plugin.zsh +++ b/plugins/sudo/sudo.plugin.zsh @@ -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