Enum watchexec::Shell [−][src]
pub enum Shell { None, Unix(String), Powershell, }
Expand description
Shell to use to run commands.
Cmd
and Powershell
are special-cased because they have different calling
conventions. Also Cmd
is only available in Windows, while Powershell
is
also available on unices (provided the end-user has it installed, of course).
See Config.cmd
for the semantics of None
vs the
other options.
Variants
Use no shell, and execute the command directly.
Unix(String)
Use the given string as a unix shell invocation.
This means two things:
- the program is invoked with
-c
followed by the command, and - the string will be split on space, and the resulting vec used as
execvp(3) arguments: first is the shell program, rest are additional
arguments (which come before the
-c
mentioned above). This is a very simplistic approach deliberately: it will not support quoted arguments, for example. UseShell::None
with a custom command vec if you want that.
Use Powershell, on Windows or elsewhere.
This is invoked with -Command
followed by the command.
This is preferred over Unix("pwsh")
, though that will also work
on unices due to Powershell supporting the -c
short option.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Shell
impl UnwindSafe for Shell
Blanket Implementations
Mutably borrows from an owned value. Read more