Makes wp nav shortcuts work in multisites

master
Jonathan Hodgson 6 years ago
parent a073005423
commit 8aa7aabfe3
  1. 6
      shells/functions
  2. 4
      shells/profile

@ -97,7 +97,8 @@ function ptheme() {
else else
wpPath=$public_html; wpPath=$public_html;
fi fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "parent" | awk '{print $1}'))) domain="$(basename $(dirname $public_html ) ).local.jh"
theme=$(dirname $(wp --path="$wpPath" --url="$domain" theme path $(wp --path="$wpPath" --url="$domain" theme list 2> /dev/null | grep "parent" | awk '{print $1}') 2> /dev/null ))
if [ -d $theme ]; then if [ -d $theme ]; then
if [ -d "$theme" ]; then if [ -d "$theme" ]; then
cd $theme cd $theme
@ -120,7 +121,8 @@ function get_theme() {
else else
wpPath=$public_html; wpPath=$public_html;
fi fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "active" | grep -v "inactive" | awk '{print $1}'))) domain="$(basename $(dirname $public_html ) ).local.jh"
theme=$(dirname $(wp --path="$wpPath" --url="$domain" theme path $(wp --path="$wpPath" --url="$domain" theme list 2> /dev/null | grep "active" | grep -v "inactive" | awk '{print $1}') 2> /dev/null ))
if [ -d $theme ]; then if [ -d $theme ]; then
echo $theme echo $theme
else else

@ -1,7 +1,7 @@
export LANG="en_GB.UTF-8" export LANG="en_GB.UTF-8"
export TERMINAL=/usr/local/bin/st export TERMINAL=/usr/local/bin/st
export TERM=xterm-256color export TERM=xterm-256color
export PATH=~/.bin:$PATH:/opt/lampp/bin:. export PATH=~/.bin:$PATH:/opt/lampp/bin:~/.config/composer/vendor/bin:.
export EDITOR='vim' export EDITOR='vim'
export READER='zathura' export READER='zathura'
export CDPATH=.:~:~/Sites export CDPATH=.:~:~/Sites
@ -12,4 +12,4 @@ GEM_PATH=$GEM_HOME
export PATH=$PATH:$GEM_HOME/bin export PATH=$PATH:$GEM_HOME/bin
export GEM_HOME=$(ruby -e 'print Gem.user_dir') export GEM_HOME=$(ruby -e 'print Gem.user_dir')
#echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'\n\nTo update 3d party plugins, run command 'u3p'\n\nTo turn on my servers, run command 'sudo lampp start'" | /usr/bin/cowsay -f tux -W 80 #echo -e "Please don't sabotage my computer while I'm away \n\nTo turn on the print server, run the command 'cups'" | /usr/bin/cowsay -f tux -W 80

Loading…
Cancel
Save