Handle -- as flag terminator in sudo wrapper

This commit is contained in:
Kovid Goyal 2026-05-04 23:30:27 +05:30
parent 021377c1b6
commit 4ab166c9ac
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 5 additions and 0 deletions

View file

@ -26,6 +26,7 @@ if [[ -n "$KITTY_BASH_INJECT" ]]; then
is_sudoedit="y"
builtin break;
fi
[[ "$arg" == "--" ]] && builtin break # end of options
[[ "$arg" != -* && "$arg" != *=* ]] && builtin break # command found
done
if [[ "$is_sudoedit" == "y" ]]; then