delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/05/22/20:10:56

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-YMail-OSG: mQZpUHQVM1lucopjDFUZCxW9MDp6IjEf3LkDE8VXjb0uHQF6xpj0a.WvTZE8ZY3wPruIABphzIqHv5rialYsFUSGPcUwUQRuxZqqdLMVOSG47fmqil2GljV8JYBYWeIzkqqklxvU5kjSfH6ahxGkAyJCPzH7LCWohA--
X-Yahoo-Newman-Property: ymail-3
Message-ID: <48360BA0.8010509@kringlecottage.com>
Date: Thu, 22 May 2008 19:11:12 -0500
From: Dave & Diane <daveanddiane AT kringlecottage DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
MIME-Version: 1.0
To: Barladeanu Eva-BEB047 <evab AT motorola DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: cscope on cygwin
References: <C44E399F46788C4B9F549FD8F21BF354027762BF AT zil01exm61 DOT ds DOT mot DOT com> <C44E399F46788C4B9F549FD8F21BF354027762C9 AT zil01exm61 DOT ds DOT mot DOT com>
In-Reply-To: <C44E399F46788C4B9F549FD8F21BF354027762C9@zil01exm61.ds.mot.com>
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

Hi Eva,

Sorry for the delay in replying - I just checked my cscope mail.

You can do what you want, but you are falling in to the trap of .cmd 
file extensions.

When you set the EDITOR variable to a .cmd file, it will be run as a 
windows script, not a bash script.

Your use of "&" only works in bash scripts, not windows scripts.

I created a script called "cs_edit" and did:

shift
/c/windows/notepad.exe $@ &

Let me explain what this does.When I run mlcscope and pick a line, the 
arguments given to $EDITOR are "+2 filename"

For some reason which I am not sure of right now, +2 is the first 
argument. That isn't right and I'll look at that separately, but for now 
the "shift" causes all the arguments to shift down one place and it 
drops the first arg so the arguments become just the filename,

Then the $@ puts the argument list on the command line as you expected.

I think the reason you tried %2 is to avoid that first argument right?

As you deduced, the '&' runs the command in the background.

Make sure that cs_edit is in your path and is executable (chmod 755 
cs_edit), and you should be up and running.

Let me know if you have any other problems.

Cheers
Dave

Barladeanu Eva-BEB047 wrote:

>Hello,
> 
>I am a newcomer to cygwin.
>I installed "mlcscope-14.1.8-2" on an XP service pack 2 machine.
>I built the cscope.out data base and I can run searches on the data
>base.
>I defined the "EDITOR" variable as follows:
> 
>             EDITOR="/cygdrive/d/Profiles/myaccount/cs_editor.cmd"
> 
>             Where the "cs_editor.cmd" files contains:
> 
>             textpad %2 &
> 
> 
>Trying to open a file of the search result, textpad opens the file.
> 
>The problem is that while textpad is open I have no access to cscope and
>can not open more
>files or run subsequent searches.
>This behavior is like in UNIX when I open the text editor in foreground.
> 
>Can I run somehow the textpad in background?
> 
>Thank you,
> 
>
>Eva Barladeanu
>
>Motorola
>
>
>--
>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/
>
>
>  
>


-- 

Diane & Dave
http://www.velvetstarbears.com/  http://www.kringlecottage.com/
Fortune: The difference between America and England is that the
English think 100 miles is a long distance and the Americans
think 100 years is a long time.


--
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