mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
feat: Add a module for C projects (#3631)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
@@ -335,6 +335,13 @@ impl<'a> Context<'a> {
|
||||
Duration::from_millis(self.root_config.command_timeout),
|
||||
)
|
||||
}
|
||||
|
||||
/// Attempt to execute several commands with exec_cmd, return the results of the first that works
|
||||
pub fn exec_cmds_return_first(&self, commands: Vec<Vec<&str>>) -> Option<CommandOutput> {
|
||||
commands
|
||||
.iter()
|
||||
.find_map(|attempt| self.exec_cmd(attempt[0], &attempt[1..]))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
Reference in New Issue
Block a user