This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cscope on cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]