Incorrect expansion of a program argument that is a special character?

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Wed Jul 21 15:44:51 GMT 2021


On 2021-07-21 05:42, Ev Drikos via Cygwin wrote:
> When I run the program below from my home directory in a PowerShell
> Console (Windows 8-1) I've to use an extra backslash character as
> shown below or the star is expanded. Which happens only when the
> program has been compiled in Cygwin.
> 
> Is this a bug or a known feature?

It's a feature which emulates the argument expansions normally performed 
by shells under Unix like systems.
If a Cygwin program is not run from a Cygwin shell, then the Cygwin 
program startup argument parsing obeys the quoting rules and performs 
the argument expansions which running from a Cygwin shell would normally 
perform, so the program sees the same arguments as running from a Cygwin 
shell would generate.

Run "info bash 'pattern matching'" then press u (Up) and repeat to see 
other argument expansions and processing performed; tab and press Enter 
to view Topics; press q to Quit.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list