Last active
June 25, 2023 15:31
-
-
Save sshtmc/6e30036ffbf0f5a839ca23faebc9479f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Keep history from all terminal sessions | |
# Avoid duplicates | |
HISTCONTROL=ignoredups:erasedups | |
export HISTSIZE=100000 # big big history | |
export HISTFILESIZE=100000 # big big history | |
# When the shell exits, append to the history file instead of overwriting it | |
shopt -s histappend | |
# After each command, append to the history file and reread it | |
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r" | |
##### Pyenv | |
# curl https://pyenv.run | bash | |
export PYENV_ROOT="$HOME/.pyenv" | |
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
# Restart your shell for the changes to take effect. | |
# Load pyenv-virtualenv automatically by adding | |
# the following to ~/.bashrc: | |
eval "$(pyenv virtualenv-init -)" | |
##### direnv | |
eval "$(direnv hook bash)" | |
##### ssh-agent | |
export SSH_AUTH_SOCK=${SSH_AUTH_SOCK:-~/.ssh/ssh_auth_sock} | |
if ! ssh-add -l > /dev/null && ls $HOME/.ssh/id*.pub >/dev/null 2>&1; then | |
pkill ssh-agent | |
eval "$(ssh-agent)" | |
ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock | |
ssh-add | |
fi | |
cd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment