Someone getting the password from your terminal is the least of your problems.
The bigger problem is that using the proxy via a non-encrypted protocol over the network, your login and password can be easily sniffed. BASIC HTTP password authentication encoding is too weak and is deencoded on the fly.
An immediate improvement is tunneling the proxy requests over SSH, using
autossh to be always logged in the proxy server.
Over time, the requests to the proxy service should be made over TLS if possible.
As for the terminal, I always have a lock icon on it, and when I have to leave my desk I click the lock icon.
Back to protecting the password on your disk:
protect the password in an encrypted file, with OpenSSL for instance.
Write a login script that fills your http_proxy variable at login time asking you for a password. If you are using Gnome and are able to get the password from Gnome keyring to fill http_proxy is other interesting solution.