I'd like 2 tabs to open when I ddev launch:
https://example.ddev.site
https://example.ddev.site/admin
Is there any way to configure this?
Solved:
To setup a global command that opens 2 tabs when ddev launch
is used on MacOS, navigate to ~/.ddev/commands/host
and edit (vim, nano, etc.) the existing launch
command, or clone that file and make a new one. I made a new one called open
using cp launch open
and then nano open
to edit the file.
Remove the first line that reads:
## #ddev-generated: If you want to edit and own this file, remove this line.
If you want to edit the commented out lines at the top to change all launch
references in the comments to open
, do so.
Then move to the bottom of the file. Edit the lines:
"darwin"*)
open ${FULLURL}
;;
to
"darwin"*)
open ${FULLURL} && open ${FULLURL}/admin
;;
Save (ctrl+x) and exit. Run ddev stop and ddev start on any running projects to copy new commands to the project on startup. Now ddev open
will open your front end and control panel in two tabs. Since this is global, it will work with all projects. ddev launch
will still open just the front end in a single tab.