From 147417ec056974cdfb96bfe3b90cbc646eba86f2 Mon Sep 17 00:00:00 2001 From: 10sr Date: Thu, 8 Dec 2011 12:44:42 +0900 Subject: [PATCH] bug fixes --- .bashrc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) mode change 100755 => 100644 .bashrc diff --git a/.bashrc b/.bashrc old mode 100755 new mode 100644 index 8b7a51b..843757a --- a/.bashrc +++ b/.bashrc @@ -280,11 +280,12 @@ safe-cmd stty stop undef # unbind C-s to stop displaying output # $OSTYPEとか使えるのかな iswindows(){ - uname | grep -iE 'windows|MINGW' >/dev/null 2>&1 + # uname | grep -iE 'windows|MINGW' >/dev/null 2>&1 + iscygwin || ismsys } ismsys(){ - false + uname | grep -E "^MINGW32" >/dev/null 2>&1 } iscygwin(){ @@ -321,8 +322,11 @@ if iscygwin; then : alias setclip="tee /dev/clipboard" : alias catclip="cat /dev/clipboard | tr -d \\r" alias cygsu="cygstart /cygwinsetup.exe" - alias em="CYGWIN=tty emacs -nw" + alias emacs="CYGWIN=tty emacs -nw" echo "cygwin bash" +fi + +if iswindows; then # export PS1=" \[\e[32m\]\u@\H \[\e[33m\]\w\[\e[0m\] \d \t\n\s \# \j \$ " export PS1=" [\[\e[33m\]\w\[\e[0m\]]\n\[\e[32m\]\u@\H\[\e[0m\] \d \t \s.\v\nhist:\# jobs:\j \$ " fi