diff --git a/src/client/commands.rs b/src/client/commands.rs index 15e5cf2..8bc3d58 100644 --- a/src/client/commands.rs +++ b/src/client/commands.rs @@ -60,10 +60,14 @@ pub enum ClientCommand { /// /// 2. Non-interactive mode: If the `-p` flag is specified, the user can write privileges using arguments. /// - /// The privilege arguments should be formatted as `:+-` + /// The privilege arguments should be formatted as `::` /// where the privileges are a string of characters, each representing a single privilege. /// The character `A` is an exception - it represents all privileges. /// + /// The `` character is optional and can be either `+` to grant additional privileges + /// or `-` to revoke privileges. If omitted, the privileges will be set exactly as specified, + /// removing any privileges not listed, and adding any that are. + /// /// The character-to-privilege mapping is defined as follows: /// /// - `s` - SELECT @@ -80,7 +84,7 @@ pub enum ClientCommand { /// - `A` - ALL PRIVILEGES /// /// If you provide a database name, you can omit it from the privilege string, - /// e.g. `edit-privs my_db -p my_user+siu` is equivalent to `edit-privs -p my_db:my_user:siu`. + /// e.g. `edit-privs my_db -p my_user:siu` is equivalent to `edit-privs -p my_db:my_user:siu`. /// While it doesn't make much of a difference for a single edit, it can be useful for editing multiple users /// on the same database at once. /// @@ -98,6 +102,10 @@ pub enum ClientCommand { /// /// `muscl edit-privs my_db -p my_user:siu my_other_user:ct`` /// + /// Add the `DELETE` privilege for user `my_user` on database `my_db`: + /// + /// `muscl edit-privs my_db -p my_user:+d + /// #[command(verbatim_doc_comment)] EditPrivs(EditPrivsArgs),