Is there currently a bug in the `--tags` argument for the current CLI 2.27.0 version?

Options
suchademon
suchademon
Community Member

Hello,
I found the following in the CLI version 2.27.0 while I upgraded my wrapper scripts to support the new CLI version:

$ op item edit APP_xxxxxxxx.eu --tags=''
ID:          nqehrspxxxxxxxxxxxxxxxxxx
Title:       APP_xxxxxx.eu
Vault:       Vault1 (xxxxxxxxxxxxxxxxx)
Created:     2 years ago
Updated:     now by xxxxxxx
Favorite:    false
Tags:        [],c5b4df28f1ef8d04946a96ececf9478d00a1b508
Version:     28
Category:    LOGIN
Fields:
...

Copy from op item edit --help:

      --tags tags                    Set the tags to the specified (comma-separated) values. An
                                     empty value will remove all tags.

So either the documentation needs to be updated, or there is a bug, at least it looks like this.

According to op item edit --help the argument --tags="" or --tags should clean all tags, but it does not, it creats a new version.

Also if I place a real value in there, it does not replace the existing tags, it is appending it:

$ op item edit APP_anio.eu --tags='asdf'
ID:          nqehxxxxxxxxxxxxxxxxxx
Title:       APP_xxxxxxxxxx.eu
Vault:       Vault1 (xxxxxxxxxxxxxxxxxxxxxxxx)
Created:     2 years ago
Updated:     now by xxxxxxx
Favorite:    false
Tags:        [],asdf,c5b4df28f1ef8d04946a96ececf9478d00a1b508
Version:     29
Category:    LOGIN
Fields:
...

I tried to use the delete syntax for custom fields, if that would do the trick but of course not:

$ op item edit APP_xxxxxxxxxxxxxx.eu 'tags[delete]'
[ERROR] 2024/04/18 21:26:09 cannot delete "tags" because it is a built-in field

Is that on purpose now that tags get appended instead of replaced?
If yes, how do I delete all tags from the CLI on one item? (As I need this to keep pass with 1pass in sync and the UIDs for this are placed currently in the tags filed)

Btw while I was writing this, I tested also this:

$ op item edit APP_xxxxxxxxxxxxxx.eu
ID:          nqehrxxxxxxxxxxxxxxxxxxxxxxxxxx
Title:       APP_xxxxxxxxxxxxxxxxxxxxxx.eu
Vault:       Vailt1 (xxxxxxxxxxxxxxxxxxxxxxxxx)
Created:     2 years ago
Updated:     now by xxxxxxxxxxxxxxxx
Favorite:    false
Tags:        [],asdf,c5b4df28f1ef8d04946a96ececf9478d00a1b508
Version:     31
Category:    LOGIN
Fields:

Do you see it? The version counter increased (form 29 to 31 as I did 2 test of the same command) even I haven't specified anything to change.
Could it be that there is a general bug in op edit ?

Did not tried op create, but can if needed

OS: Debian 13
Kernel: 6.6.15-2
1Password CLI: 2.27.0

Many thanks in advance


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser: Not Provided