mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-12-25 11:20:01 +00:00
parent
009eb93c83
commit
e7c1976528
@ -38,7 +38,7 @@ pub struct Context<'a> {
|
||||
/// E.g. when navigating to a PSDrive in PowerShell, or a path without symlinks resolved.
|
||||
pub logical_dir: PathBuf,
|
||||
|
||||
/// A struct containing directory contents in a lookup-optimised format.
|
||||
/// A struct containing directory contents in a lookup-optimized format.
|
||||
dir_contents: OnceCell<DirContents>,
|
||||
|
||||
/// Properties to provide to modules.
|
||||
|
@ -110,7 +110,7 @@ fn get_shell<'a, 'b>(
|
||||
}
|
||||
|
||||
/// Attempt to run the given command in a shell by passing it as either `stdin` or an argument to `get_shell()`,
|
||||
/// depending on the configuration or by invoking a platform-specific falback shell if `shell` is empty.
|
||||
/// depending on the configuration or by invoking a platform-specific fallback shell if `shell` is empty.
|
||||
fn shell_command(cmd: &str, config: &CustomConfig, context: &Context) -> Option<Output> {
|
||||
let (shell, shell_args) = get_shell(config.shell.0.as_ref(), context);
|
||||
let mut use_stdin = config.use_stdin;
|
||||
|
@ -115,7 +115,7 @@ impl<'de> Deserializer<'de> for ValueDeserializer<'de> {
|
||||
visitor.visit_some(self)
|
||||
}
|
||||
|
||||
// Handle ignored Values. (Values at unkown keys in TOML)
|
||||
// Handle ignored Values. (Values at unknown keys in TOML)
|
||||
fn deserialize_ignored_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
|
||||
where
|
||||
V: Visitor<'de>,
|
||||
|
@ -59,7 +59,7 @@ pub fn get_command_string_output(command: CommandOutput) -> String {
|
||||
|
||||
/// Attempt to resolve `binary_name` from and creates a new `Command` pointing at it
|
||||
/// This allows executing cmd files on Windows and prevents running executable from cwd on Windows
|
||||
/// This function also initialises std{err,out,in} to protect against processes changing the console mode
|
||||
/// This function also initializes std{err,out,in} to protect against processes changing the console mode
|
||||
pub fn create_command<T: AsRef<OsStr>>(binary_name: T) -> Result<Command> {
|
||||
let binary_name = binary_name.as_ref();
|
||||
log::trace!("Creating Command for binary {:?}", binary_name);
|
||||
|
Loading…
Reference in New Issue
Block a user