Add --
instead of performing a short-circuit upon detecting a script-block.
#38
Labels
Issue-Task
It's a feature request, but it doesn't really need a major design.
Description of the new feature / enhancement
Enhance sudo to recognize and support script blocks prefixed with
--
. Currently, the script will short-circuit and execute script blocks directly, leading to perhaps unexpected behavior. By introducing support for the--
prefix, users can clearly indicate when a following argument is a script block.Scenario when this would be used?
One scenario where adding support for the
--
argument for script blocks would be useful is when users need to pass a script block as an argument to the sudo command within a command line environment.With the
--
argument implemented, users can specify script blocks explicitly, ensuring that they are processed correctly by sudo. This can be particularly useful in automation scenarios, scripting tasks, or when invoking sudo from other scripts or tools where passing script blocks as arguments is necessary. Call it free will if you may.Supporting information
The text was updated successfully, but these errors were encountered: