delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/09/23:28:09

X-Spam-Check-By: sourceware.org
Message-ID: <10da72180703092027g114247bdo9e7cf4e128a7321@mail.gmail.com>
Date: Fri, 9 Mar 2007 20:27:38 -0800
From: "spam head" <spamhead42 AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: problems calling another program
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I am trying to set it up so that I can easily start the windows gvim
(not the cygwin one) from cygwin.  I have two methods which mostly
work, but each one has a small problem.

Method #1:  function in my .bashrc
function mygvim2
{
    /d/vim/vim70/gvim.exe -u d:/vim/_vimrc  $(cygpath -w "$@") &
}

This function works fine, except that when I call it from rxvt, it
pulls up gvim behind my rxvt window, instead of switching to that
window.


Method #2: separate file
I put an alias in my .bashrc file which says "alias vi=mygvim", and
then I put this in the file mygvim:
#! /bin/bash
/d/vim/vim70/gvim.exe -u d:/vim/_vimrc $(cygpath -w "$@") &

This works as well (and switches to gvim as well).  The (minor)
problem is that each time I call it, I get this message in the BASH
window:
: command not foundgvim: line 2:


I know that this is nit-picking, but can anybody help me eliminate
either of these two minor problems?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019