Skip to main content

Module shell

Module shell 

Source
Expand description

The Shell builder (zx $), its options and the scoped defaults used by within, configure and cd.

Re-exports§

pub use crate::local_bin::PreferLocal;

Structs§

Options
Options controlling how commands are run (the fields of zx $).
Shell
A command factory carrying Options (the zx $).

Constants§

BASH_PREFIX
Prefix used by bash so that failures inside pipelines are not hidden.
POWERSHELL_POSTFIX
Postfix used by PowerShell so that the exit code is propagated.

Functions§

cd
Change the working directory of the current scope (zx cd()).
configure
Mutate the options of the current scope (zx $.verbose = true, …).
current_options
Snapshot of the options active in the current within scope (or the global defaults, which honour ZX_* environment variables).
find_executable
Locate an executable on PATH.
use_bash
Switch the current scope to bash.
use_powershell
Switch the current scope to powershell.exe.
use_pwsh
Switch the current scope to pwsh.
within
Run fut with a private copy of the current options, so that changes made inside (via configure or cd) do not leak out.
within_sync
Synchronous flavour of within.