Something wrong with cygstart

Andrey Repin via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
Greetings, All!

I'm using a wrapper script to comfortably start VS Code from file manager.

The last line of it is

cygstart --hide -- "/proc/cygdrive/c/Program Files/Microsoft VS Code/bin/code.cmd" "$(cygpath -alw "$_arg")"

It works well up to the point where there are no spaces in the $_arg. But on
the first seen space it break the arguments list into pieces.
I have to double-quote the argument to maintain the consistency, like

cygstart --hide -- "/proc/cygdrive/c/Program Files/Microsoft VS Code/bin/code.cmd" "\"$(cygpath -alw "$_arg")\""

but that's a questionable solution at best.

I'm unable to track the origin of such behavior, so I need an advice.


-- 
With best regards,
Andrey Repin
Sunday, December 14, 2025 12:07:31

Sorry for my terrible english...


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.