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<SE: brush_core::extensions::ShellExtensions, S: brush_core::ShellBuilderState> ShellBuilderExt
15 for brush_core::ShellBuilder<SE, S>
16{
17 fn default_builtins(self, set: BuiltinSet) -> Self {
18 self.builtins(crate::default_builtins(set))
19 }
20}