fix switch commands ordering so they work properly (sw, sw edit out)

This commit is contained in:
dusk 2025-10-11 04:19:25 +00:00
parent bbed401314
commit da8ff942c9
No known key found for this signature in database

View file

@ -17,14 +17,14 @@ pub fn cmds() -> impl Iterator<Item = Command> {
]; ];
[ [
command!(switch, ("commands", ["help"]) => "switch_commands"),
command!(switch, out => "switch_out"), command!(switch, out => "switch_out"),
command!(switch, r#move, OpaqueString => "switch_move"), // TODO: datetime parsing
command!(switch, delete => "switch_delete").flag(("all", ["clear", "c"])), command!(switch, delete => "switch_delete").flag(("all", ["clear", "c"])),
command!(switch, r#move, OpaqueString => "switch_move"), // TODO: datetime parsing
command!(switch, edit, out => "switch_edit_out").flag(YES), command!(switch, edit, out => "switch_edit_out").flag(YES),
command!(switch, edit, Optional(MemberRefs) => "switch_edit").flags(edit_flags), command!(switch, edit, Optional(MemberRefs) => "switch_edit").flags(edit_flags),
command!(switch, copy, Optional(MemberRefs) => "switch_copy").flags(edit_flags), command!(switch, copy, Optional(MemberRefs) => "switch_copy").flags(edit_flags),
command!(switch, ("commands", ["help"]) => "switch_commands"), command!(switch, MemberRefs => "switch_do"),
command!(switch, Optional(MemberRefs) => "switch_do"),
] ]
.into_iter() .into_iter()
} }