Below is a list of bash_aliases and other tricks to make your interaction with DDEV even better:
# DDEV
alias dcr='ddev drush cr'
alias duli='ddev drush uli'
alias composer='ddev composer'
alias drush='ddev drush'
alias robo='ddev robo' # Expect a robo command defined in your global or project settings.
alias xe='ddev xdebug enable'
alias xd='ddev xdebug disable'
alias xt='status=$(ddev xdebug status) && if [ "$status" == "xdebug enabled" ]; then ddev xdebug off; else ddev xdebug on; fi'
For the robo
command to work add the following under ~/.ddev/commands/web/robo
or in your projects .ddev
folder, under the same path.
commands/web/robo -p
#!/bin/bash
## Description: Run robo inside the web container
## Usage: robo [flags] [args]
## Example: "ddev robo init"
robo "$@
To run robo
tasks from inside PHPStorm (you can even run them from inside your README.md files!) use https://plugins.jetbrains.com/plugin/18813-ddev-integration and things like:
Image
And finally, to have a similar experience in and out of DDEV containers, symlink your .gitconfig
to ~/.ddev/homeadditions
. Also consider adding a .bash_aliases with the following:
alias ll="ls -lhA"
alias groot='cd $(git rev-parse --show-cdup)'
alias mkdir='mkdir -p -v'
# Make Bash error tolerant
alias ..='cd ..'
alias cd..='cd ..'
# Automatically prepend cd when entering just a path in the shell
shopt -s autocd
# XDebug
alias xe='enable_xdebug'
alias xd='disable_xdebug'