Creates a new `CD` command that changes the current location in `storage`.
(storage: Rc<RefCell<Storage>>)
| 140 | impl CdCommand { |
| 141 | /// Creates a new `CD` command that changes the current location in `storage`. |
| 142 | pub fn new(storage: Rc<RefCell<Storage>>) -> Rc<Self> { |
| 143 | Rc::from(Self { |
| 144 | metadata: CallableMetadataBuilder::new("CD") |
| 145 | .with_syntax(&[( |
| 146 | &[SingularArgSyntax::RequiredValue( |
| 147 | RequiredValueSyntax { name: Cow::Borrowed("path"), vtype: ExprType::Text }, |
| 148 | ArgSepSyntax::End, |
| 149 | )], |
| 150 | None, |
| 151 | )]) |
| 152 | .with_category(CATEGORY) |
| 153 | .with_description("Changes the current path.") |
| 154 | .build(), |
| 155 | storage, |
| 156 | }) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | #[async_trait(?Send)] |
nothing calls this directly
no test coverage detected