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

Ev Drikos
Wed Jul 21 11:42:59 GMT 2021


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?

Ev. Drikos

PS C:\Users\suser> .\args.exe '\*'

PS C:\Users\suser>

#include <stdio.h>
int main(int argc, char *argv[]){
int i;
for (i=1; i < argc; i++) {
return 0;

More information about the Cygwin mailing list