0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

自分用メモ - .bashrc

Last updated at Posted at 2020-09-25

##.bashrc

プロンプトとカラー設定&カラーマニュアル、エイリアスなど

.bashrc
# .bashrc


# Hide zsh alert
export BASH_SILENCE_DEPRECATION_WARNING=1


# Default configuration
export LSCOLORS="gxfxcxdxabegedabagacad"


# Set prompt string color
lc='\[\e[1;' #lead-in character
RED=${lc}31m;
GREEN=${lc}32m
PURPLE=${lc}35m
RC=${lc}0m #reset character

if [ $UID -eq 0 ];
	then
		pc=$RED
	else
		pc=$GREEN
fi

PS1="${pc}\]\u@\h \W\\$ ${RC}\]"


# Colored manual
export LESS_TERMCAP_mb=$(printf '\e[01;31m')
export LESS_TERMCAP_md=$(printf '\e[01;35m')
export LESS_TERMCAP_me=$(printf '\e[0m')
export LESS_TERMCAP_se=$(printf '\e[0m')
export LESS_TERMCAP_so=$(printf '\e[01;33m')
export LESS_TERMCAP_ue=$(printf '\e[0m')
export LESS_TERMCAP_us=$(printf '\e[04;36m')


# User specified aliases
alias ls='ls -G'
alias la='ls -A'
alias ll='ls -l'
alias lla='ls -lA'
alias brew-clean='rm -rf $(brew --cache)'
alias brew-prune='brew cleanup -s --prune all'


# User specified commands
mkcd () {
  mkdir "$1"
  cd "$1"
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?