use crate::domain::expand as domain_expand;
use crate::domain::model::{Config, ExpandResult};
use crate::domain::shell::Shell;
use crate::domain::timings::Timings;
pub(crate) use crate::domain::expand::WhichResult;
pub(crate) fn expand<F>(
config: &Config,
token: &str,
shell: Shell,
command_exists: F,
) -> ExpandResult
where
F: Fn(&str) -> bool,
{
domain_expand::expand(config, token, shell, command_exists)
}
pub(crate) fn expand_timed<F>(
config: &Config,
token: &str,
shell: Shell,
command_exists: F,
timings: &mut Timings,
) -> ExpandResult
where
F: Fn(&str) -> bool,
{
domain_expand::expand_timed(config, token, shell, command_exists, timings)
}
pub(crate) fn which_abbr<F>(
config: &Config,
token: &str,
shell: Shell,
command_exists: F,
) -> WhichResult
where
F: Fn(&str) -> bool,
{
domain_expand::which_abbr(config, token, shell, command_exists)
}
pub(crate) fn list_pairs<'a>(config: &'a Config, shell: Option<Shell>) -> Vec<(&'a str, String)> {
domain_expand::list(config, shell)
}