mirror of
https://github.com/youwen5/iamb.git
synced 2025-08-04 03:28:28 -07:00
Document every client command in the manual page (#441)
This commit is contained in:
parent
c420c9dd65
commit
a9cb5608f0
2 changed files with 51 additions and 21 deletions
|
@ -484,6 +484,10 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
|
|||
("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(),
|
||||
("tag", "set", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room tag unset <tag-name>
|
||||
("tag", "unset", Some(s)) => RoomAction::Unset(RoomField::Tag(tag_name(s)?)).into(),
|
||||
("tag", "unset", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room notify set <notification-level>
|
||||
("notify", "set", Some(s)) => RoomAction::Set(RoomField::NotificationMode, s).into(),
|
||||
("notify", "set", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
@ -496,10 +500,6 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
|
|||
("notify", "show", None) => RoomAction::Show(RoomField::NotificationMode).into(),
|
||||
("notify", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room tag unset <tag-name>
|
||||
("tag", "unset", Some(s)) => RoomAction::Unset(RoomField::Tag(tag_name(s)?)).into(),
|
||||
("tag", "unset", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room aliases show
|
||||
("alias", "show", None) => RoomAction::Show(RoomField::Aliases).into(),
|
||||
("alias", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
@ -563,13 +563,14 @@ fn iamb_space(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
|
|||
};
|
||||
|
||||
let act: IambAction = match (field.as_str(), action.as_str()) {
|
||||
// :space child remove
|
||||
("child", "remove") => {
|
||||
if !(args.is_empty()) {
|
||||
return Err(CommandError::InvalidArgument);
|
||||
}
|
||||
SpaceAction::RemoveChild.into()
|
||||
},
|
||||
// :space child set
|
||||
// :space child set <child>
|
||||
("child", "set") => {
|
||||
let mut order = None;
|
||||
let mut suggested = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue