Improved some find_working calls.
authorIain Patterson <me@iain.cx>
Tue, 31 Aug 2010 09:39:59 +0000 (10:39 +0100)
committerIain Patterson <me@iain.cx>
Wed, 15 Sep 2010 13:14:36 +0000 (14:14 +0100)
Require vim --version to print something useful.
Skip argument checks for certain find_working commands.

.profile.d/diff.bashrc
.profile.d/pager.bashrc
.profile.d/vim.bashrc

index af307ce..61cda4f 100644 (file)
@@ -1,4 +1,4 @@
-colordiff=$(find_working colordiff 2>/dev/null)
+colordiff=$(find_working -A colordiff 2>/dev/null)
 if [ $? = 0 ]; then
   alias diff="$colordiff"
 fi
index a138375..dbcb3d6 100644 (file)
@@ -1,5 +1,5 @@
 # profile-required: TERM.bashrc
-less=$(find_working less 2>/dev/null)
+less=$(find_working -A less 2>/dev/null)
 if [ $? = 0 ]; then
   export PAGER=less
   export GIT_PAGER=$PAGER
index 15b4008..930d200 100644 (file)
@@ -1,4 +1,4 @@
-vim=$(find_working vim 2>/dev/null)
+vim=$(find_working -a --version vim 2>/dev/null)
 if [ $? = 0 ]; then
   if [ -n "$PROFILE_HOME" ]; then
     VISUAL="$vim --cmd ':se rtp=$PROFILE_HOME/.vim,\$VIMRUNTIME' -u $PROFILE_HOME/.vimrc"