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 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 CC: cygwin AT cygwin DOT com Subject: Re: cscope on cygwin References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/