mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 14:57:54 +00:00
better parameters handling, implement import export
This commit is contained in:
parent
e4f38c76a9
commit
5198f7d83b
19 changed files with 250 additions and 174 deletions
|
|
@ -9,23 +9,22 @@ pub fn cmds() -> impl Iterator<Item = Command> {
|
|||
let copy = ("copy", ["add", "duplicate", "dupe"]);
|
||||
let out = "out";
|
||||
|
||||
let edit_flags = [
|
||||
("first", ["f"]),
|
||||
("remove", ["r"]),
|
||||
("append", ["a"]),
|
||||
("prepend", ["p"]),
|
||||
];
|
||||
|
||||
[
|
||||
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, edit, out => "switch_edit_out"),
|
||||
command!(switch, edit, MemberRefs => "switch_edit")
|
||||
.flag(("first", ["f"]))
|
||||
.flag(("remove", ["r"]))
|
||||
.flag(("append", ["a"]))
|
||||
.flag(("prepend", ["p"])),
|
||||
command!(switch, copy, MemberRefs => "switch_copy")
|
||||
.flag(("first", ["f"]))
|
||||
.flag(("remove", ["r"]))
|
||||
.flag(("append", ["a"]))
|
||||
.flag(("prepend", ["p"])),
|
||||
command!(switch, edit, Optional(MemberRefs) => "switch_edit").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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue