EasyGnuPG / egpg

Easy GnuPG, shell scripts to make GnuPG more accessible and easier to use. (Migrated to: https://gitlab.com/EasyGnuPG/egpg)
GNU General Public License v3.0
26 stars 5 forks source link

Add confirmation while egpg key delete #55

Open diveshuttam opened 6 years ago

diveshuttam commented 6 years ago

'egpg key delete' does not ask for confirmation now, It also deletes $GPG_KEY by default if parameter($1) is empty, it would be better if we ask for a confirmation.

dashohoxha commented 6 years ago

I wonder why it accepts a key-id as argument? If there is only one key, then this is the key that will be deleted. Maybe it is a remainder from early versions of egpg which has not been cleaned up.

It might be useful only in a situation when we have imported an existing key-ring and there are more than one secret keys in it. If we try egpg key delete it will delete the first one that it finds. If we want to keep the first one and delete another, we have to specify its key-id. But in this case maybe it is better that we use egpg gpg --delete-keys <key-id>

If you see some other case when it can be useful let me know. In any case let us fix it at the end, it is not a big problem (except for any confusion that it might create).

diveshuttam commented 6 years ago

Not sure but Maybe useful for the case when a key has various subkeys and we want to delete a specific subkey.

dashohoxha commented 6 years ago

In egpg there is only one subkey for decryption (the main one is used for signature). And also there is no way for handling subkeys (after deleting a subkey, how do you create a new one?). The signature key and the encryption key are handled as a single one, created together, deleted together, etc.