From ddb1335b75dbcacd9e3bf7bf7cb90510b67f13af Mon Sep 17 00:00:00 2001 From: Ken-ichi Mito Date: Sat, 12 Mar 2016 21:30:08 +0900 Subject: [PATCH] update bashrc for Arch Linux * remove inactive functions * set git command completion file for bash --- TipAndDoc/.bashrc | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/TipAndDoc/.bashrc b/TipAndDoc/.bashrc index 8d7dfbc..fd11a78 100644 --- a/TipAndDoc/.bashrc +++ b/TipAndDoc/.bashrc @@ -26,25 +26,13 @@ function I { if [ "$1" ]; then history | grep "$@"; else history 30; fi } -if [ -f $BASH_COMPLETION_DIR/git -o -f $BASH_COMPLETION_COMPAT_DIR/git \ - -o -f $BASH_COMPLETION_COMPAT_DIR/git-prompt ]; then - export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\$ ' +if [ -f /usr/share/git/completion/git-prompt.sh ]; then + source /usr/share/git/completion/git-prompt.sh + export PS1='\u@\h:\w$(__git_ps1)\$ ' else - export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' + export PS1='\u@\h:\w\$ ' fi -if [ -d $HOME/bin -a `echo $PATH | grep -c $HOME/bin` -eq 0 ]; then - export PATH=$PATH:$HOME/bin -fi - -function svnst { - svn st $@ | grep "^[^?]" -} - -function hexcmp { - cmp -l "$@" | awk '{printf "%08X %02X %02X\n", $1-1, strtonum(0$2), strtonum(0$3)}' -} - alias vi='vim' alias sudo='sudo -H ' alias rm='rm -v' -- 1.7.9.5