Last active
April 23, 2024 08:21
-
-
Save priancho/de8ed29482374d98aa15 to your computer and use it in GitHub Desktop.
.bashrc
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
# .bashrc | |
# source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# set DBUS for ssh connection | |
eval `dbus-launch --auto-syntax` | |
# basic settings | |
export TMPDIR="/tmp/hancheol" | |
alias vi=/usr/local/bin/vim | |
alias ls='ls --color=auto' | |
# OSX color ls | |
#export CLICOLOR=1 | |
#export LSCOLORS=ExFxBxDxCxegedabagacad | |
#alias ls='ls -GFh' | |
alias jobs='jobs -l' | |
function du2 { | |
if [ $# -eq 0 ]; then | |
local depth=1 | |
else | |
local depth=$1 | |
fi | |
du -h --max-depth=$depth | |
} | |
# prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
# \u : 유저명 | |
# \h : 호스트명 | |
# \W : 작업 디렉토리 | |
export PS1="\e[32m\u@\h\e[0m \W\e[93m\$(parse_git_branch)\e[0m$ " | |
export TMOUT=0 | |
export PROMPT_COMMAND="" | |
# git | |
git config credential.helper cache 86400 | |
alias gitlog="git log --oneline" | |
alias gittree="git log --oneline --graph --all --decorate --abbrev-commit" | |
# tmux | |
if [[ -z $TMUX ]]; then | |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | |
export PATH="/usr/local/bin:/usr/bin:$PATH" | |
fi | |
alias tls='tmux list-session' | |
alias tnew='tmux new-session -s' | |
alias tre='tmux attach-session -d -t' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment