From 328f2f42404cb5de71e06be1e44ddc1957a89800 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 9 Jul 2009 16:14:04 +0100 Subject: [PATCH] Windows compatibility. Handle the case where HOME contains spaces, eg on NT 5. Force the Vim runtime path to contain ~/.vim. --- .bash_profile | 2 +- .profile.d/PATH.bashrc | 6 +++--- .vimrc | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) 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. -- 2.20.1