Last active
May 10, 2024 05:11
-
-
Save priancho/282e1536218269b43584737d2f1f2909 to your computer and use it in GitHub Desktop.
.bash_priancho file for WSL2
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
#-------------------------# | |
#----- WSL2 settings -----# | |
#-------------------------# | |
sudo service docker start | |
#--------------------------# | |
#----- Basic settings -----# | |
#--------------------------# | |
# Define colors | |
C_DEFAULT="\[\033[m\]" | |
C_WHITE="\[\033[1m\]" | |
C_BLACK="\[\033[30m\]" | |
C_RED="\[\033[31m\]" | |
C_GREEN="\[\033[32m\]" | |
C_YELLOW="\[\033[33m\]" | |
C_BLUE="\[\033[34m\]" | |
C_PURPLE="\[\033[35m\]" | |
C_CYAN="\[\033[36m\]" | |
C_LIGHTGRAY="\[\033[37m\]" | |
C_DARKGRAY="\[\033[1;30m\]" | |
C_LIGHTRED="\[\033[1;31m\]" | |
C_LIGHTGREEN="\[\033[1;32m\]" | |
C_LIGHTYELLOW="\[\033[1;33m\]" | |
C_LIGHTBLUE="\[\033[1;34m\]" | |
C_LIGHTPURPLE="\[\033[1;35m\]" | |
C_LIGHTCYAN="\[\033[1;36m\]" | |
C_BG_BLACK="\[\033[40m\]" | |
C_BG_RED="\[\033[41m\]" | |
C_BG_GREEN="\[\033[42m\]" | |
C_BG_YELLOW="\[\033[43m\]" | |
C_BG_BLUE="\[\033[44m\]" | |
C_BG_PURPLE="\[\033[45m\]" | |
C_BG_CYAN="\[\033[46m\]" | |
C_BG_LIGHTGRAY="\[\033[47m\]" | |
export TMPDIR="/tmp/hancheol" | |
# Avoid duplicate entires when tmux is initiated. | |
if [[ -z $TMUX ]]; then | |
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH" | |
export PATH="/usr/local/bin:/usr/bin:$PATH" | |
fi | |
# aliases | |
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 | |
} | |
## GIT branch | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$(parse_git_branch) $ " | |
# export PS1="$C_BG_BLUE \u@\h $C_DEFAULT \W$C_LIGHTYELLOW\$(parse_git_branch)$C_DEFAULT $ " | |
# \u : 유저명 | |
# \h : 호스트명 | |
# \W : 작업 디렉토리 | |
export TMOUT=0 | |
export PROMPT_COMMAND="" | |
# git | |
alias gitlog="git log --oneline" | |
alias gittree="git log --oneline --graph --all --decorate --abbrev-commit" | |
# tmux | |
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