atuinsh / atuin

✨ Magical shell history
https://atuin.sh
MIT License
20.4k stars 554 forks source link

Env var option to disable atuin or make session history volatile for integrated Terminals (VS Code, IDEs) #1545

Open ghost opened 9 months ago

ghost commented 9 months ago

I just installed atuin and I like it so far but one thing that is disrupting my workflow is that it also shows up and records history for integrated Terminals in VS Code!

You see I have set VS Code to ignore my shell history and go off the record for whatever I enter in my VS Code Terminals in order to keep my main shell history clean from commands that would only apply to certain projects and not my general usage when I fire up Terminal on my Linux, by adding these in my settings:

"terminal.integrated.env.linux": {
        "HISTFILE": ""
    },

If you could provide an option to make atuin ignore the main history file and store the current session's history in a temporary file that would go away as soon as the Terminal is terminated, that would be awesome!

gabrielztk commented 8 months ago

Hey @kyochikuto !

I think these are the environment variables that you are looking for.

export ATUIN_DB_PATH=/tmp/atuin_dev.db
export ATUIN_RECORD_STORE_PATH=/tmp/atuin_records.db

You could also set them to per project files instead of temp ones. I currently use direnv to the load the variables pertaining to the current project.