pub enum Shell {
Windows,
Bash,
Tcsh,
Zsh,
Ksh,
}
Expand description
The types of shells we know about
Variants§
Implementations§
Source§impl Shell
impl Shell
Sourcepub fn cd<P: AsRef<OsStr>>(&self, p: P)
pub fn cd<P: AsRef<OsStr>>(&self, p: P)
Prints to stdout the necessary command to change directory.
Sourcepub fn setenv<K: AsRef<OsStr>, V: AsRef<OsStr>>(&self, k: K, v: V)
pub fn setenv<K: AsRef<OsStr>, V: AsRef<OsStr>>(&self, k: K, v: V)
Prints to stdout the necessary command to set an envionrment variable
Sourcepub fn split_env<K: AsRef<OsStr>>(&self, k: K) -> Vec<OsString>
pub fn split_env<K: AsRef<OsStr>>(&self, k: K) -> Vec<OsString>
A simple wrapper around std::env::split_paths
Sourcepub fn setenv_list<K, I, T>(&self, k: K, v: I)
pub fn setenv_list<K, I, T>(&self, k: K, v: I)
A simple wrapper around std::env::join_paths
and setenv
Auto Trait Implementations§
impl Freeze for Shell
impl RefUnwindSafe for Shell
impl Send for Shell
impl Sync for Shell
impl Unpin for Shell
impl UnwindSafe for Shell
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