-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbashrc
More file actions
30 lines (30 loc) · 860 Bytes
/
Copy pathbashrc
File metadata and controls
30 lines (30 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
main_domain=$(uapi DomainInfo list_domains 2>/dev/null | awk '$1 ~ "main_domain:" {print $2}')
PS1='\[\e[92m\]\u@${main_domain}\[\e[31m\]:\[\e[35m\]\w\[\e[0m\][$?] \$ '
RED="\e[31m"
GREEN="\e[32m"
SET="\e[0m"
BLINK="\e[5m"
UNBLINK="\e[25m"
BLUESH="\e[44m"
SETSH="\e[49m"
newestphpversion=$(ls -1 /usr/local/bin/ea-php7* | tail -n 1 | tr -d @)
alias wp="$newestphpversion ~/bin/migbin/wp"
alias gopub="cd ~/public_html"
alias htoff='mv .htaccess .htaccessOFF'
alias hton='mv .htaccessOFF .htaccess'
alias db='grep DB_ wp-config.php'
alias wpsqlurl="grep -oP siteurl\',\ ?\'[a-zA-Z0-8:/\.~]+\' "
function mkcd() {
for x in "$@"; do
mkdir -p "$x"
done
cd "${@: -1}"
}
function mig() {
mkdir -p ~/migration/{files,dbs}
cd ~/migration/files
}
if [[ ! $(echo $PATH | grep migbin) ]]; then
PATH=$PATH:~/bin/migbin
fi
cat ~/bin/migbin/migbin