diff --git a/cli/valet.php b/cli/valet.php index f13b5b0..663c03b 100755 --- a/cli/valet.php +++ b/cli/valet.php @@ -172,13 +172,13 @@ })->descriptions('Get all of the paths registered with Valet'); /** - * Open the current directory in the browser. + * Open the current or given directory in the browser. */ - $app->command('open', function () { - $url = "http://".Site::host(getcwd()).'.'.Configuration::read()['domain'].'/'; + $app->command('open [domain]', function ($domain = null) { + $url = "http://".($domain ?: Site::host(getcwd())).'.'.Configuration::read()['domain']; passthru("open ".escapeshellarg($url)); - })->descriptions('Open the site for the current directory in your browser'); + })->descriptions('Open the site for the current (or specified) directory in your browser'); /** * Generate a publicly accessible URL for your project.