Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, I have this as well:

   export HISTSIZE=65535 # why not?
   export HISTFILESIZE=65535
   export HISTCONTROL=ignoredups
but now I'm wondering if I should unset `HISTFILESIZE` insteead.


It can also be nice to use HISTCONTROL=ignorespace

If you're planning on keeping a lot of history, ignorespace makes it easy to avoid inserting commands with sensitive info. A well-placed $(cat) can work too.

    $  PASSWORD=hunter2 # sensitive info doesn't go into history
    $ curl -O http://name:$PASSWORD@server/path # command with correct syntax does go into history




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: