brush_builtins/
builder.rs

1use crate::BuiltinSet;
2
3/// Extension trait that simplifies adding default builtins to a shell builder.
4pub trait ShellBuilderExt {
5    /// Add default builtins to the shell being built.
6    ///
7    /// # Arguments
8    ///
9    /// * `set` - The well-known set of built-ins to add.
10    #[must_use]
11    fn default_builtins(self, set: BuiltinSet) -> Self;
12}
13
14impl<S: brush_core::ShellBuilderState> ShellBuilderExt for brush_core::ShellBuilder<S> {
15    fn default_builtins(self, set: BuiltinSet) -> Self {
16        self.builtins(crate::default_builtins(set))
17    }
18}