It would be helpful if
op get item would return different return codes between the cases where the item doesn't exist, and the cases where multiple items exist.
For example, assume that I have only two items in my Personal folder, and both are named
% op get item testnote; echo rc=$? [LOG] 2018/05/30 12:08:54 (ERROR) multiple items found with query "testnote", please choose one of the following matches: for the item testnote in vault Personal, run `op get item l2od5pfrhutheqwkn5uoh53wxa` for the item testnote in vault Personal, run `op get item w2cdw2rkqdeixetvk6uoqtiw7m` rc=1 % op get item nonexistent; echo rc=$? [LOG] 2018/05/30 12:09:44 (ERROR) item nonexistent not found rc=1
It would be nice if we get different return codes in these cases, so scripts that make
op get item calls don't have to parse the text that is returned in order to understand what happened.
I suggest that in the first case, the return code should be the number of matching items. In my example, it would be 2.
In the second case, I suggest that -1 be the return code, so that it is distinguishable from other unrelated errors that would normally return a code of 1.
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided