Skip to content

Instantly share code, notes, and snippets.

@neiromaster
Last active February 5, 2020 08:35
Show Gist options
  • Save neiromaster/d9e28d87e7c99a2cae28595bc64910f2 to your computer and use it in GitHub Desktop.
Save neiromaster/d9e28d87e7c99a2cae28595bc64910f2 to your computer and use it in GitHub Desktop.
Optimal config for git-bash. Add/update these files in your profile directory.
if [[ -f ~/.bashrc ]]; then
source ~/.bashrc
fi
# Fix cyrillic symbols in JetBrains terminals
export LC_ALL=C.UTF-8
# Save 5,000 lines of history in memory
export HISTSIZE=10000
# Save 2,000,000 lines of history to disk (will have to grep ~/.bash_history for full listing)
export HISTFILESIZE=2000000
# Append to history instead of overwrite
shopt -s histappend
# Ignore redundant or space commands
export HISTCONTROL=ignoreboth
# Ignore more
export HISTIGNORE='ls:ll:ls -alh:pwd:clear:history'
# Set time format
# export HISTTIMEFORMAT='%F %T '
# Multiple commands on one line show up as a single line
shopt -s cmdhist
# Append new history lines, clear the history list, re-read the history list, print prompt.
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment