From: Iain Patterson Date: Thu, 9 Jul 2009 15:14:04 +0000 (+0100) Subject: Windows compatibility. X-Git-Url: http://git.iain.cx/?p=profile.git;a=commitdiff_plain;h=328f2f42404cb5de71e06be1e44ddc1957a89800 Windows compatibility. Handle the case where HOME contains spaces, eg on NT 5. Force the Vim runtime path to contain ~/.vim. --- diff --git a/.bash_profile b/.bash_profile index 5b49345..b8e11d4 100644 --- a/.bash_profile +++ b/.bash_profile @@ -11,7 +11,7 @@ if $(tty -s) || [ "${0:0:1}" = "-" ]; then LC_ALL=C # Source all scripts. - for i in ~/.profile.d/*.bashrc; do . $i; done; unset i + for i in ~/.profile.d/*.bashrc; do . "$i"; done; unset i # Maybe turn nocaseglob back on. [ $nocg = 0 ] && shopt -s nocaseglob diff --git a/.profile.d/PATH.bashrc b/.profile.d/PATH.bashrc index fa7fa01..3113f75 100644 --- a/.profile.d/PATH.bashrc +++ b/.profile.d/PATH.bashrc @@ -3,7 +3,7 @@ # # Location of the XXXdirs files. -DIR=$HOME/.profile.d +DIR="$HOME/.profile.d" # Set one path to be the same as another. function copypath() { @@ -12,7 +12,7 @@ function copypath() { # Sanitise and export. path="$(eval echo \$$oldpath)" - [ -z "$path" ] || eval export $newpath="$path" + [ -z "$path" ] || eval "export $newpath='$path'" unset path newpath oldpath } @@ -48,7 +48,7 @@ function makepath() { [ -z "$path" ] && return # Export. - eval export $newpath="$path" + eval "export $newpath='$path'" unset path newpath dirs } diff --git a/.vimrc b/.vimrc index 3f4fd1d..6e26f27 100644 --- a/.vimrc +++ b/.vimrc @@ -17,6 +17,11 @@ version 4.0 " No compatibility mode. se nocp +" Find stuff. +if has("win32") + se rtp=~/.vim,$VIMRUNTIME +endif + " Tabstop 2. se ts=2 " And use spaces not tabs.