Struct zsh_module::BuiltinBuilder
source · pub struct BuiltinBuilder { /* private fields */ }Expand description
Properties of a zsh builtin command
Any chages will reflect on the behaviour of the builtin
Implementations§
source§impl BuiltinBuilder
impl BuiltinBuilder
sourcepub fn minargs(self, value: i32) -> Self
pub fn minargs(self, value: i32) -> Self
Sets the minimum amount of arguments allowed by the builtin
sourcepub fn maxargs(self, value: Option<u32>) -> Self
pub fn maxargs(self, value: Option<u32>) -> Self
Sets the maximum amount of arguments allowed by the builtin
sourcepub fn build(self, name: &'static str, cb: impl Cmd + 'static) -> ModuleBuilder
pub fn build(self, name: &'static str, cb: impl Cmd + 'static) -> ModuleBuilder
Registers the builtin.
By default, the builtin can take any amount of arguments (minargs and maxargs are 0 and None, respectively) and no flags.