Skip to content

Instantly share code, notes, and snippets.

@neotohin
Created December 9, 2015 06:04
Show Gist options
  • Save neotohin/bf2c1416d876b38bb6aa to your computer and use it in GitHub Desktop.
Save neotohin/bf2c1416d876b38bb6aa to your computer and use it in GitHub Desktop.
Drush related zsh functions for Drupal Related operation
alias dpml='drush pml | grep '
function sass.c(){
dtheme=`drush vget theme_default | cut -d' ' -f 2`;
echo "Current Theme: $dtheme";
compass compile "sites/all/themes/$dtheme";
}
function sass.w(){
dtheme=`drush vget theme_default | cut -d' ' -f 2`;
echo "Current Theme: $dtheme";
compass watch "sites/all/themes/$dtheme";
}
function dru-pm-reload() {
echo 'Disabling Module';
drush dis $1 -y
echo 'Uninstalling Module';
drush pm-uninstall $1 -y
echo 'Enabling Module';
drush en $1 -y
drush cc all
}
function dsqlc() {
gunzip -c $1 | pv | drush sqlc
}
function devmode(){
drush vset preprocess_css 0 -y
drush vset preprocess_js 0 -y
drush vset page_compression 0 -y
drush vset cache 0 -y
drush vset block_cache 0 -y
drush dis googleanalytics xmlsitemap advagg backup_migrate -y
drush en devel -y
#drush en dblog -y
}
function prodmode(){
drush vset preprocess_css 0 -y
drush vset preprocess_js 0 -y
drush vset page_compression 0 -y
drush vset cache 0 -y
drush vset block_cache 0 -y
drush dis devel -y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment