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
3 changed files with 5 additions and 0 deletions

View File

@@ -150,6 +150,9 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after
set is_sudoedit "y"
break
end
if string match -q -- "--" "$arg"
break # end of options
end
if not string match -r -q -- "^-" "$arg" and not string match -r -q -- "=" "$arg"
break # reached the command
end