171015 bashの設定
シンプルに設定
code:bash_profile
# プロンプトデザイン
export PS1=”\u@ \h: \w\n\$ ”
source ~/.bashrc
UNIXの流儀に沿って分けてます
code:bashrc
# rmコマンド実行でゴミ箱へ
# ‘rm’ move ~/.Trash
function rm () {
local path
for path in “$@”; do
# ignore any arguments
if “$path” = -* ; then :
else
local dst=${path##*/}
# append the time if necessary
dst=”$dst “$(date +%H-%M-%S)
done
mv “$path” ~/.Trash/”$dst”
fi
done
}
# lsコマンドオプション
alias ls=’ls -lG’
alias la=’ls -a’
### .inputrc
# 日本語環境設定
set convert-meta off
set output-meta on
set input-meta on
# 大文字/小文字を無視
set completion-ignore-case on
# コマンド履歴補完を賢くする
“\C-n”:history-search-forward
“\C-p”:history-search-backward
# 補完のたびにベルを鳴らせない(bell-style), 補完候補が複数個あった場合にすぐに全部表示され(show-all-if-ambiguous), 補完時にコマンドかディレクトリか見て分かる(visible-stats)
set show-all-if-ambiguous on
set visible-stats on