To stop your command line history from being recorded check out:
http://www.commandlinefu.com/commands/view/1512/execute-a-command-without-saving-it-in-the-history
Of course, there could also be a key logger on your system or externally, if you are in a country where the courts can force you to give up your password, they might be allowed to come into your home and install one, or even do evil maid attack:
http://www.schneier.com/blog/archives/2009/10/evil_maid_attac.html
You have to decide what is the reasonable level of protection for data and a system. You could also setup a system to disable or trash logging, or fill your logs with bogus entries.
You might also want to look into using a key in addition to the password. Keep the key off the system, destroy the key to preserve your data.
If its acceptable that you can tell the court the key was destroyed, then your done. If its some regime or group that doesn't care (e.g., will torture or imprison you) then its a moot point. A better solution would be to setup a remote system in a safe country and use some number of TOR and VPN tunnels and a remote session so that nothing is stored locally or retained, clear your history of connecting to the remote system or use a live cd to connect.