Closed amdei closed 8 years ago
@amdei Try echo -n -- -U
.
@agentzh Yep, it works.
@amdei Well, this is documented.
@agentzh Yep, documented. Just didn't expect I should be careful with anything started with dash, even if it is not a valid option.
@amdei Sometimes the user may make a typo in the valid option, and it's better to complain than sorry. Also, we may add new options in the future so it's important to be forward compatible.
This configuration:
location /t { echo -n "U"; echo -n "-U"; }
produces only "U" as output, while I expect it to produce "U-U".At the same time this configuration:
location /t { echo -n "-"; }
produces expected "-".Looking at the debugger output, seems that anything started with "-" treated as option, even in commas and even if it is not a valid option.
Is it bug or feature? Is there a way to overcome such behavior without introducing variable?