pub struct Pwsh;Implementations§
Trait Implementations§
Source§impl Shell for Pwsh
impl Shell for Pwsh
Source§fn quote(&self, value: &str) -> String
fn quote(&self, value: &str) -> String
Quotes a string according to PowerShell shell quoting rules. @see https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules
Source§fn format_hook(&self, hook: Hook) -> Result<String, ShellError>
fn format_hook(&self, hook: Hook) -> Result<String, ShellError>
Format a hook for the current shell.
Source§fn get_config_path(&self, home_dir: &Path) -> PathBuf
fn get_config_path(&self, home_dir: &Path) -> PathBuf
Return the path in which commands, aliases, and other settings will be configured.
Source§fn get_env_path(&self, home_dir: &Path) -> PathBuf
fn get_env_path(&self, home_dir: &Path) -> PathBuf
Return the path in which environment settings will be defined.
Source§fn get_exec_command(&self) -> ShellCommand
fn get_exec_command(&self) -> ShellCommand
Return parameters for executing a one-off command and then exiting.
Source§fn get_profile_paths(&self, home_dir: &Path) -> Vec<PathBuf>
fn get_profile_paths(&self, home_dir: &Path) -> Vec<PathBuf>
Return a list of all possible profile/rc/config paths.
Ordered from most to least common/applicable.
Source§fn format_env(&self, key: &str, value: Option<&str>) -> String
fn format_env(&self, key: &str, value: Option<&str>) -> String
Format an environment variable by either setting or unsetting the value.
Source§fn format_env_set(&self, key: &str, value: &str) -> String
fn format_env_set(&self, key: &str, value: &str) -> String
Format an environment variable that will be set to the entire shell,
and be written to a profile file.
Source§fn format_env_unset(&self, key: &str) -> String
fn format_env_unset(&self, key: &str) -> String
Format an environment variable that will be unset from the entire shell,
and be written to a profile file.
Source§fn format_path_set(&self, paths: &[String]) -> String
fn format_path_set(&self, paths: &[String]) -> String
Format the provided paths to prepend the
PATH environment variable,
and be written to a profile file.impl Copy for Pwsh
Auto Trait Implementations§
impl Freeze for Pwsh
impl RefUnwindSafe for Pwsh
impl Send for Pwsh
impl Sync for Pwsh
impl Unpin for Pwsh
impl UnwindSafe for Pwsh
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more