Pinentry and Pinentry-Curses on Mac OSX Backspace Issues

So this is going to be short and sweet… for those of you that are looking to use pinentry or pinentry-curses (at least in my case installed with Homebrew) that are having problems with the backspace character not working properly… this might just be up your alley.

Recently while using the LastPass CLI (for writing an integration with Alfred) on OSX Yosemite, I had an issue where pinentry-curses was registering the backspace character as a new character… not a backspace.

The fix was rather simple in the end… just execute the following in your terminal before the related command:

TERM=linux-vt

That seems to be enough for it to look correct (which if you just use linux the pinentry box looks very wrong as some characters are not recognised) and the backspace character now works correctly. It is a win win 😀

Hope that helps someone else!

Stuart