How to process different URL page via Drush? I'm testing the following Drush 8 command (using --uri parameter):

drush --uri=https://www.example.com/custom/path ev 'var_dump(current_path());'


however when printing current_path(), it always returns the same, default page. To clarify, specified page exists.

According to this page, I think it should work this way.

How I can make Drush to parse an URL of my choice?
As the article says, the uri parameter just populates the request information. Drush only uses this to find the site settings information.  At this point, just like in a web request, the context is the index.php page.

On a web server, the code inside the index.php takes the URI and causes the requested page to be rendered.  

Drush does not do this step.  So, when you do your ev of the current_path(), you get the default page.

The article points out that you need to call the menu_execute_active_handler() in D7 to render the page.  This take the URI and converts it to the requested page.

If you want information about the page, you will need to embed your print statements in the code for that page.

NOTE: an alternative to trying to do this via Drush is to look at using the devel module (I recommend adding the kint addon as well). This allows you to place debug statements in the code that will print out on the web page, e.g. kint($node).  Very useful in determining the structure of data so you can grab the right bit.