You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# append to the history file, don't overwrite it
|
|
shopt -s histappend
|
|
|
|
# check the window size after each command and, if necessary,
|
|
# update the values of LINES and COLUMNS.
|
|
shopt -s checkwinsize
|
|
|
|
# Disable capslock
|
|
if [[ -x $(which setxkbmap) ]]; then
|
|
if [[ $(uname) == Linux ]]; then
|
|
setxkbmap -option ctrl:nocaps
|
|
fi
|
|
fi
|
|
|
|
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
|
export EDITOR='vim'
|
|
|
|
# don't put duplicate lines in the history. See bash(1) for more options
|
|
# ... or force ignoredups and ignorespace
|
|
export HISTCONTROL=ignoredups:erasedups:ignorespace
|
|
# Use empty string for unlimited history
|
|
export HISTSIZE=
|
|
export HISTFILESIZE=
|
|
export HISTTIMEFORMAT='%y-%m-%d %T λ '
|
|
|
|
# make less more friendly for non-text input files, see lesspipe(1)
|
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
|
|
|
# enable color support of ls and also add handy aliases
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
fi
|
|
|
|
if [ "$TERM" == xterm ]; then
|
|
export TERM=xterm-256color
|
|
fi
|
|
|
|
[[ -f ~/.nvm/nvm.sh ]] && source ~/.nvm/nvm.sh
|
|
[[ -r $NVM_DIR/bash_completion ]] && source $NVM_DIR/bash_completion
|