Add "Copy Last X Digits" right click option
A lightweight and easy-to-use password manager
Brought to you by:
dreichl
When contacting services over chat or phone, many of them ask for the last X digits in your credit card.
Likewise for logins in credit card sites.
Usually they ask for 4 digits, but some even ask for 6.
Without this option, it means one has to manually expose the password and copy those digits, and that also means not protecting it from the clipboard.
I think there should be a quick option to securely copy at least see those last X digits.
Something similar is already possible.
Make a dedicated string field(s) that contain the last n characters of the full string. Then use the entry's context menu
[Other Data>*string field name*or the KeePass menu itemEntry>Other Data>*string field name*to copy and paste the string field containing the n digits.If you install the KPEnhancedEntryView plugin it is possible to auto-type string field values directly from the KeePass Entry View pane.
Thanks! That's true, it is copyable this way, but:
{T-REPLACE-RX:!{S:Credit Card}!.*(\d{4})$!$1!}would extract the last 4 digits of a credit card number from a string field called
Credit Card. (Also works on the built-in string fields)Last edit: wellread1 2025-02-01
{T-REPLACE-RX:!{PASSWORD}!.*(\d{4})$!$1!}indeed works both in Notes and in String fields, thanks!!!Still if you have 5 cards and you want both 4 and 6 digits, that means creating 10 Sting fields.
My proposal is to have it built-in since it's used a lot.
How many Credit Cards do you have?
You are considering just two particular cases where a user might want to parse a string field value in a particular way when in fact, there are a multitude of different ways a user might want to parse these values. Trying to accommodate everyone's particular needs would produce an unwieldy list. The KeePass T-REPLACE-RX placeholder provides a general way to address these parsing issues on a case by case basis. There are also ways to improve the workflow mentioned above.
You could use the {PICKCHARS} placeholder to make it an Auto-Type. Then you can choose as many characters as you need.
cheers, Paul
Nice, I can use it in a String field like
{PICKCHARS:Password}or{PICKCHARS:Password:C=4}. But it's easy to get confused while I'm a chat/phone and any mistake will cause a disconnect. Wish I could tell it to limit to last 6 digits and then let me choose in real time 4 or 6. Otherwise I'd stick with the{T-REPLACE-RX}solution for now.