#!/usr/bin/env bash # history file settings # don't add duplicate lines, lines starting with space to history HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # eternal bash history HISTFILESIZE= HISTSIZE= HISTTIMEFORMAT="[%F %T] " HISTFILE=~/.cache/bash_history if [ -z "$PROMPT_COMMAND" ]; then PROMPT_COMMAND="history -a" else PROMPT_COMMAND="history -a; $PROMPT_COMMAND" fi