The issue has been reported to engineering and document will be updated first to reflect this limitation.
User should try avoid using hyphen (and other special characters) as first character of application name.
If the first character of application name has to be a special one (like a hyphen), then use "cf curl" instead as illustrated below.
Workaround1. Add '-v' flag to trace the CLI request for "cf app" command by prefixing '\' character to application name
ubuntu@ops-manager:~/my-php-app$ cf -v app "\-my-php-app"
......
REQUEST: [2018-06-04T12:31:25+08:00] GET /v2/apps?q=name%3A%5C-my-php-app&q=space_guid%3Aaa5e4bf2-d35d-43d9-ab3a-08fa57343490 HTTP/1.1
......
2. Extract the URL from output and remove '\' (%5C). Then run "cf curl" with modified URL
ubuntu@opsmgr:~/sandbox/my-php-app$ cf curl /v2/apps?q=name%3A-my-php-app&q=space_guid%3Aaa5e4bf2-d35d-43d9-ab3a-08fa57343490
{
"total_results": 1,
"total_pages": 1,
"prev_url": null,
"next_url": null,
"resources": [
{
"metadata": {
"guid": "8a2155ee-c1a9-4574-8cda-cb92bc0a7995",
"url": "/v2/apps/8a2155ee-c1a9-4574-8cda-cb92bc0a7995",
"created_at": "2018-06-01T13:26:17Z",
"updated_at": "2018-06-01T13:26:24Z"
},
......