Skip to content

Instantly share code, notes, and snippets.

@jcchikikomori
Created July 31, 2019 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcchikikomori/128c4ceb853255ef84cbe5b71a9c1119 to your computer and use it in GitHub Desktop.
Save jcchikikomori/128c4ceb853255ef84cbe5b71a9c1119 to your computer and use it in GitHub Desktop.
ARCH LINUX TERMINAL CONFIGS
# Add Antigen
source ~/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundles <<EOBUNDLES
archlinux
common-aliases
command-not-found
colored-man-pages
# magic-enter
# extract
tmux
# php
nodejs
ruby
git
arialdomartini/oh-my-git
systemd
sudo
lol
# ssh-agent
zsh-users/zsh-completions
zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting
HeroCC/LS_COLORS
# rupa/z
EOBUNDLES
# Syntax highlighting bundle.
# antigen bundle zsh-users/zsh-syntax-highlighting
# Load the theme.
# antigen theme robbyrussell
antigen theme romkatv/powerlevel10k
#source $HOME/.zsh/themes/p10k-lean.zsh
#antigen theme $HOME/.zsh/themes bira-cust --no-local-clone
antigen apply # Use it
# Source all the configs
# source ~/.zsh/history.zsh
# source ~/.zsh/functions.zsh
# source ~/.zsh/aliases.zsh
# source ~/.zsh/exports.zsh
if [ -e "$HOME/.zsh/local.zsh" ]; then # If local.zsh exists, source it
source ~/.zsh/local.zsh
fi
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
#
# Linuxbrew
#
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
#
# ~/.bashrc
#
#/usr/bin/zsh; exit
[[ $- != *i* ]] && return
colors() {
local fgc bgc vals seq0
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
# foreground colors
for fgc in {30..37}; do
# background colors
for bgc in {40..47}; do
fgc=${fgc#37} # white
bgc=${bgc#40} # black
vals="${fgc:+$fgc;}${bgc}"
vals=${vals%%;}
seq0="${vals:+\e[${vals}m}"
printf " %-9s" "${seq0:-(default)}"
printf " ${seq0}TEXT\e[m"
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
done
echo; echo
done
}
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
# Change the window title of X terminals
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
use_color=true
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
# first to take advantage of user additions. Use internal bash
# globbing instead of external grep binary.
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
match_lhs=""
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
[[ -z ${match_lhs} ]] \
&& type -P dircolors >/dev/null \
&& match_lhs=$(dircolors --print-database)
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
if type -P dircolors >/dev/null ; then
if [[ -f ~/.dir_colors ]] ; then
eval $(dircolors -b ~/.dir_colors)
elif [[ -f /etc/DIR_COLORS ]] ; then
eval $(dircolors -b /etc/DIR_COLORS)
fi
fi
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
else
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
fi
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
PS1='\u@\h \W \$ '
else
PS1='\u@\h \w \$ '
fi
fi
unset use_color safe_term match_lhs sh
alias cp="cp -i" # confirm before overwriting something
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
alias np='nano -w PKGBUILD'
alias more=less
xhost +local:root > /dev/null 2>&1
complete -cf sudo
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. #65623
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
shopt -s expand_aliases
# export QT_SELECT=4
# Enable history appending instead of overwriting. #139609
shopt -s histappend
#
# # ex - archive extractor
# # usage: ex <file>
ex ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# better yaourt colors
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
# linuxbrew/homebrew
# export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"
# export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"
# export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
# composer auto-load
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
# qt5 specific
export QT_QPA_PLATFORMTHEME="qt5ct"
# default editor
export EDITOR=/usr/bin/nano
# gtk2 specific
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
# linuxbrew. Can ignore
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
# rbenv
eval "$(rbenv init -)"
: 1564144854:0;exec $SHELL
: 1564145479:0;git clone https://aur.archlinux.org/byobu.git
: 1564145484:0;cd byobu
: 1564145536:0;makepkg
: 1564145546:0;makepkg -i
: 1564145554:0;sudo pacman -Sy tmux
: 1564145566:0;makepkg -i
: 1564145584:0;cd
: 1564145696:0;sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
: 1564145812:0;cat .bash_profile
: 1564145822:0;nemo .bash_profile
: 1564145828:0;nano .bash_profile
: 1564145882:0;nano .profile
: 1564145914:0;echo $PATH
: 1564145924:0;nano .bash_profile
: 1564145992:0;source .bash_profile
: 1564145995:0;brew
: 1564146015:0;source .bash_profile
: 1564146017:0;nano .bash_profile
: 1564146037:0;echo $PATH
: 1564146051:0;echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"' >>~/.bashrc
: 1564146056:0;echo $PATH
: 1564146061:0;echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.bashrc
: 1564146067:0;echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.bashrc
: 1564146072:0;exec $SHELL
: 1564146074:0;echo $PATH
: 1564146077:0;brew
: 1564146082:0;nano .bashrc
: 1564146113:0;source .bashrc
: 1564146115:0;echo $PATH
: 1564146119:0;brew
: 1564146137:0;test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
: 1564146141:0;test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
: 1564146145:0;test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profi
: 1564146148:0;echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profil
: 1564146152:0;exec $SHELL
: 1564146154:0;brew
: 1564146159:0;nano .bashrc
: 1564146169:0;exec $SHELL
: 1564146171:0;brew
: 1564146186:0;brew install nodejs
: 1564146261:0;node -v
: 1564146269:0;brew install rbenv
: 1564146706:0;sudo pacman -Syuuu byobu
: 1564146720:0;sudo pacman -y byobu
: 1564146727:0;sudo pacman -Syy byobu
: 1564146774:0;byobu
: 1564146850:0;byobu-enable
: 1564146856:0;exec $SHELL
: 1564146896:0;rbenv
: 1564146901:0;brew install rbenv
: 1564146925:0;rbenv
: 1564146927:0;brew install rbenv
: 1564146933:0;source .bashrc
: 1564146935:0;brew install rbenv
: 1564146938:0;rbenv
: 1564146946:0;source .profile\
: 1564146946:0;source .profile
: 1564146953:0;rbenv
: 1564146955:0;brew
: 1564146971:0;source .zshrc
: 1564146974:0;brew
: 1564146995:0;source .bash_profi
: 1564146997:0;source .bash_profile
: 1564147001:0;rbenv
: 1564147030:0;nano .bashrc
: 1564147057:0;exec $SHELL
: 1564147060:0;echo $GAGO
: 1564147064:0;nano .bashrc
: 1564147074:0;exec $SHELL
: 1564147076:0;echo $GAGO
: 1564147079:0;nano .bashrc
: 1564147094:0;echo $GAGO
: 1564147098:0;echo $GAGODSA
: 1564147100:0;nano .bashrc
: 1564147291:0;echo $GAGO
: 1564147296:0;rbenv
: 1564147299:0;brew
: 1564147308:0;source .profile
: 1564147311:0;brew
: 1564147319:0;source .bash_profile
: 1564147324:0;brew
: 1564147343:0;nano .bashrc
: 1564147360:0;source .bashrc
: 1564147369:0;source .bash_profile
: 1564147373:0;brew
: 1564147416:0;test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
: 1564147422:0;test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
: 1564147426:0;test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
: 1564147430:0;echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
: 1564147432:0;brew
: 1564147450:0;source .profil
: 1564147451:0;source .profile
: 1564147454:0;brew
: 1564147462:0;source .profile
: 1564147464:0;brew
: 1564147480:0;echo $SHELL
: 1564147487:0;byobu-enable
: 1564147499:0;brew
: 1564147517:0;nano .profile
: 1564147537:0;nano .bash_profi
: 1564147542:0;rm .bash_profi
: 1564147545:0;nano .bash_profile
: 1564147561:0;nano .zshrc
: 1564147638:0;node
: 1564147653:0;node -v
: 1564147661:0;gem
: 1564147668:0;gem install temocli
: 1564147692:0;ruby -v
: 1564147696:0;gem install teamocil
: 1564147703:0;brew install rvm
: 1564147718:0;rbenv
: 1564147725:0;rbenv which
: 1564147731:0;rbenv shell
: 1564147737:0;rbenv init
: 1564147748:0;nano .profil
: 1564147754:0;rm .profil
: 1564147755:0;nano .profile
: 1564147765:0;exec $SHELL
: 1564147773:0;rbenv shell
: 1564147779:0;rbenv install
: 1564147784:0;rbenv install 2.6.3
: 1564147853:0;brew install php
: 1564147895:0;brew install nginx
: 1564147929:0;brew install php
: 1564147939:0;brew install readline
: 1564147954:0;gem install teamocil
: 1564147961:0;mkdir ~/.teamocil
: 1564147968:0;teamocli --edit default
: 1564147974:0;teamocil --edit default
: 1564148038:0;teamocil default
: 1564148039:0;neofetch
: 1564148039:0;ll -a
: 1564148039:0;cd /mnt/personal; ll -a
: 1564148060:0;nano .zshrc
: 1564148077:0;exec $SHELL
: 1564148146:0;brew install nginx
: 1564148579:0;which php
: 1564148593:0;which php-fpm
: 1564148597:0;brew install nginx
: 1564148618:0;nginx start
: 1564148663:0;brew uninstall nginx
: 1564148678:0;brew uninstall php
: 1564148692:0;phpbrew
: 1564150954:0;neofetch
: 1564150970:0;sudo pacman -Sy redshift
: 1564151537:0;systemctl status snap
: 1564151538:0;systemctl status snapd
: 1564151550:0;sudo systemctl enable snapd
: 1564151557:0;sudo systemctl start snapd
: 1564151583:0;snap --help
: 1564151601:0;snap run spotify
: 1564151671:0;echo $GTK_MODULES
: 1564151680:0;unset GTK_MODULES
: 1564151686:0;snap run spotify
: 1564151701:0;unset GTK_MODULES
: 1564151705:0;echo $GTK_MODULES
: 1564151707:0;snap run spotify
: 1564151725:0;sudo snap reinstall spotify
: 1564151738:0;sudo snap remove spotify
: 1564151767:0;sudo pacman -Sy spotify
: 1564151773:0;sudo pacman -Sy spotify-client
: 1564151784:0;sudo snap purge spotify
: 1564151789:0;sudo snap help
: 1564151796:0;sudo snap restart
: 1564151809:0;sudo snap install spotify --classic
: 1564153399:0;sudo snap install core
: 1564154445:0;which ffmpeg
: 1564154506:0;cd /mnt/personal/
: 1564154507:0;ll
: 1564154509:0;ll -a
: 1564154528:0;cd '$RECYCLE.BINN/'
: 1564154529:0;ll
: 1564154546:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=1 images/thumb%04d.jpg -hide_banner
: 1564154554:0;mkdir images
: 1564154555:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=1 images/thumb%04d.jpg -hide_banner
: 1564154661:0;mkdir images
: 1564154670:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf images/thumb%04d.jpg -hide_banner
: 1564154682:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=1 images/thumb%04d.jpg
: 1564154695:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 fps=1 images/thumb%04d.jpg
: 1564154701:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -v fps=1 images/thumb%04d.jpg
: 1564154705:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -f fps=1 images/thumb%04d.jpg
: 1564154712:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=0.5 images/thumb%04d.jpg
: 1564154765:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=60 images/thumb%04d.jpg
: 1564156707:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=30 images/thumb%04d.jpg
: 1564156721:0;mkdir images
: 1564156722:0;ffmpeg -i QVR_2019_07_26_16_02_05.mp4 -vf fps=30 images/thumb%04d.jpg
: 1564157049:0;sudo pacman -Syu
: 1564157074:0;sudo pacman -S nginx
: 1564157583:0;sudo pacman -S nginx-mainline
: 1564157606:0;systemctl status nginx
: 1564157619:0;sudo systemctl enable nginx; sudo systemctl start nginx
: 1564157629:0;nginx -v
: 1564157658:0;sudo pacman -S mariadb
: 1564157737:0;lsmod
: 1564157747:0;sudo modprobe p4_clockmod
: 1564157754:0;sudo modprobe speedstep-centrino
: 1564157763:0;sudo modprobe acpi-cpufreq
: 1564157771:0;ls /lib/modules/$(uname -r)/kernel/drivers/cpufreq
: 1564157785:0;lsmod | grep freq
: 1564157794:0;sudo modprobe cpufreq_conservative cpufreq_ondemand cpufreq_powersave cpufreq_stats cpufreq_userspace freq_table
: 1564157801:0;sudo cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
: 1564157807:0;sudo sh -c "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
: 1564157824:0;sudo sh "echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
: 1564157847:0;cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
: 1564157858:0;sudo echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
: 1564157885:0;sudo cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate_min
: 1564157903:0;sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysq
: 1564157932:0;sudo systemctl start mariadb
: 1564157947:0;systemctl status mariadb
: 1564157975:0;mysql -u
: 1564157978:0;mysql -u root
: 1564157986:0;mysql
: 1564157990:0;mysql -u mysql
: 1564157992:0;sudo mysql
: 1564157999:0;systemctl status mariadb
: 1564158071:0;mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
: 1564158075:0;sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
: 1564158137:0;sudo mysql
: 1564158144:0;sudo systemctl start mariadb
: 1564158148:0;sudo mysql
: 1564158167:0;sudo systemctl enable mariadb
: 1564158177:0;sudo mysql_secure_installation
: 1564158291:0;mysql -u root
: 1564158296:0;mysql -u root -p
: 1564158301:0;sudo pacman -S php php-fpm
: 1564158334:0;rbenv
: 1564158344:0;rbenv global
: 1564158362:0;sudo nano /etc/nginx/nginx.conf
: 1564158446:0;sudo pacman -Sy gvim
: 1564158491:0;sudo gvim /etc/nginx/nginx.conf
: 1564158554:0;sudo nginx -t
: 1564158563:0;sudo systemctl reload nginx
: 1564158570:0;sudo systemctl start php-fpm\
sudo systemctl enable php-fpm
: 1564158578:0;sudo systemctl start php-fpm; sudo systemctl enable php-fpm
: 1564158592:0;sudo nano /usr/share/nginx/html/test.p
: 1564158614:0;sudo nano /usr/share/nginx/html/test.php
: 1564158618:0;sudo nano /usr/share/nginx/html/test.p
: 1564158636:0;sudo rm /usr/share/nginx/html/test.p
: 1564158678:0;sudo gvim /etc/php/php.ini
: 1564158784:0;sudo sed -i 's/;extension=mysqli/extension=mysqli/g' /etc/php/php.ini
: 1564158791:0;sudo sed -i 's/;extension=pdo_mysql/extension=pdo_mysql/g' /etc/php/php.ini
: 1564158800:0;sudo systemctl reload php-fpm
: 1564158825:0;sudo pacman -S imagemagick php-imagick
: 1564158842:0;sudo nano /etc/pacman.conf
: 1564158879:0;sudo pacman -Sy yaourt fakeroot
: 1564158901:0;sudo pacman -S binutils
: 1564158909:0;yaourt
: 1564158921:0;sudo pacman -S php-pear
: 1564158957:0;git clone https://aur.archlinux.org/package-query.git
: 1564158983:0;cd package-query; makepkg -si; cd ..
: 1564159020:0;sudo pacman -S libalpm
: 1564159042:0;git clone https://aur.archlinux.org/yaourt.git
: 1564159052:0;cd yaourt; makepkg -si; cd ..
: 1564159073:0;yaourt
: 1564159078:0;cd
: 1564159096:0;yaourt php-pear
: 1564159118:0;echo $SHELL
: 1564159127:0;sudo pacman -S autoconf make gcc pkg-config imagemagick re2c
: 1564159155:0;sudo pecl install imagick
: 1564159167:0;sudo pacman -Sy pecl
: 1564159196:0;pkgfile pecl
: 1564159215:0;yaourt php-pear
: 1564159392:0;https://aur-dev.archlinux.org/php-pear.git
: 1564159397:0;git clone https://aur-dev.archlinux.org/php-pear.git
: 1564159408:0;cd php-pear; makepkg -si; cd ..
: 1564159505:0;gpg --recv-keys 72A321BAC245F175 && sudo pacman -Syyu && yaourt php-pear
: 1564159698:0;sudo pecl install imagick
: 1564159865:0;sudo sed -i 's/;extension=imagick/extension=imagick/g' /etc/php/php.ini
: 1564159877:0;sudo sed -i 's/;extension=imagick.so/extension=imagick.so/g' /etc/php/php.ini
: 1564159887:0;sudo gvim /etc/php/php.ini
: 1564159981:0;sudo systemctl reload php-fpm
: 1564160751:0;git config --global user.name "John Cyrill Corsanes"
: 1564160840:0;git config --global user.email "jccorsanes@protonmail.com"\
: 1564160980:0;ssh-keygen -t rsa -C "jccorsanes@protonmail.com"
: 1564161012:0;ssh-keygen -t rsa -C "johncyril@gorated.ph"
: 1564161050:0;cat ~/.ssh
: 1564161077:0;touch ~/.ssh/id_rsa_gorated
: 1564161079:0;ssh-keygen -t rsa -C "johncyril@gorated.ph"
: 1564161119:0;ssh-keygen -t rsa -C "johncyrillcorsanes@gmail.com"
: 1564161145:0;pbcopy < ~/.ssh/id_rsa.pub
: 1564161152:0;xclip < ~/.ssh/id_rsa.pub
: 1564161157:0;cat ~/.ssh/id_rsa.pub
: 1564161267:0;cat ~/.ssh/id_rsa_gorated.pub
: 1564161400:0;gvim ~/.ssh/config
: 1564161503:0;ssh-add -l
: 1564161521:0;mkdir rails
: 1564161523:0;cd rails
: 1564161524:0;git clone git@bitbucket.org:gorated/payment.git
: 1564161542:0;git clone git@bitgorated:gorated/payment.git
: 1564161566:0;ssh -T bitgorated
: 1564161574:0;gvim ~/.ssh/config
: 1564161653:0;eval "$(ssh-agent -s)"
: 1564161656:0;ssh-add -l
: 1564161659:0;cd
: 1564161661:0;ssh-add -l
: 1564161664:0;eval "$(ssh-agent -s)"
: 1564161665:0;ssh-add -l
: 1564161674:0;ssh-add -l .ssh
: 1564161680:0;cd
: 1564161682:0;ssh-add -l .ssh
: 1564161684:0;ssh-add -l
: 1564161739:0;eval $(ssh-agent) > /dev/null
: 1564161744:0;ssh-add -l
: 1564161748:0;eval "$(ssh-agent -s)"
: 1564161751:0;eval $(ssh-agent) > /dev/null
: 1564161752:0;eval "$(ssh-agent -s)"
: 1564161755:0;ssh-add -l
: 1564161760:0;ll
: 1564161763:0;cd .ssh
: 1564161764:0;ll
: 1564161766:0;ll -a
: 1564161771:0;ssh-add -l
: 1564161834:0;ssh-add .
: 1564161836:0;ssh-add /.
: 1564161841:0;ssh-add .*
: 1564161845:0;ssh-add '.*'
: 1564161850:0;ssh-add id_rsa
: 1564161856:0;ssh-add id_rsa_bb
: 1564161860:0;ssh-add id_rsa_gorated
: 1564161869:0;ll
: 1564161881:0;nemo .
: 1564161929:0;ll
: 1564161933:0;ssh-add id_rsa_gorated
: 1564161941:0;cd
: 1564161944:0;cd rails
: 1564161946:0;git clone git@bitgorated:gorated/payment.git
: 1564161961:0;cd payment
: 1564161967:0;bundle install
: 1564162170:0;bin/setup
: 1564162178:0;bundle exec rails test
: 1564162194:0;glog
: 1564194582:0;neofetch
: 1564194603:0;screenfetch
: 1564194613:0;neofetch
: 1564194970:0;cd
: 1564194971:0;git clone https://github.com/jonaski/strawberry
: 1564195242:0;sudo pacman -Sy phpmyadmin
: 1564195273:0;cd strawberry
: 1564195298:0;mkdir build; cd build
: 1564195307:0;cd
: 1564195316:0;rm -rf strawberry
: 1564195454:0;sudo pacman -Sy clementine
: 1564195784:0;ll .config/Clementine/
: 1564195802:0;cd .config
: 1564195817:0;cp -r Clementine/ Clementine.bak/
: 1564195825:0;rm -rf Clementine/
: 1564195833:0;git clone git@github.com:jcchikikomori/clementine-config-linux.git Clementine/
: 1564196178:0;cd
: 1564199719:0;sudo mysql
: 1564207050:0;cd /var/www/
: 1564207066:0;sudo mkdir /var/www/
: 1564207105:0;sudo mkdir /var/www/local.covemanila.com
: 1564207119:0;sudo mkdir /var/www/local.covemanila.com/html
: 1564207139:0;sudo rm /var/www/local.covemanila.com/html
: 1564207144:0;sudo rm -r /var/www/local.covemanila.com/html
: 1564207155:0;ll /var/www/local.covemanila.com/
: 1564207184:0;sudo chown -R $USER:$USER /var/www/local.covemanila.com
: 1564207835:0;curl -sLf https://spacevim.org/install.sh | bash
: 1564207856:0;curl -sLf https://spacevim.org/install.sh | zsh
: 1564207946:0;cd
: 1564207956:0;sudo pacman -Sy otf-fira-code
: 1564209980:0;which cur;
: 1564209981:0;which curl
: 1564209990:0;sudo pacman -Sy curl
: 1564210012:0;brew uninstall curl
: 1564210031:0;curl -sLf https://spacevim.org/install.sh | zsh
: 1564210050:0;vim
: 1564284995:0;cd Desktop/New\ Folder
: 1564284997:0;cd atbs
: 1564285009:0;ffmpeg -i IMG_0344.mp4 -vf fps=30 images/thumb%04d.jpg
: 1564285026:0;mkdir images
: 1564285027:0;ffmpeg -i IMG_0344.mp4 -vf fps=30 images/thumb%04d.jpg
: 1564286663:0;teamocil default
: 1564286669:0;ll -a
: 1564286669:0;cd /mnt/personal; ll -a
: 1564286669:0;neofetch
: 1564286706:0;sudo -u postgres createuser chris -s
: 1564286767:0;sudo pacman -Syu postgresql
: 1564286799:0;sudo pacman -Sy postgresql
: 1564297496:0;sudo -u postgres createuser john -s
: 1564297570:0;sudo systemctl start postgres
: 1564297572:0;sudo systemctl start postgresql
: 1564297619:0;initdb -D /var/lib/postgres/data
: 1564297635:0;sudo -iu postgres
: 1564297746:0;sudo systemctl start postgresql
: 1564297753:0;sudo systemctl enable postgresql
: 1564297852:0;sudo pacman -Sy phppgadmin
: 1564297913:0;sudo gvim /etc/php/php.ini
: 1564297983:0;sudo gvim /etc/nginx/nginx.conf
: 1564298026:0;sudo systemctl restart nginx
: 1564298039:0;systemctl status nginx
: 1564298091:0;sudo gvim /etc/nginx/nginx.conf
: 1564298124:0;systemctl status nginx
: 1564298127:0;sudo systemctl restart nginx
: 1564298158:0;sudo gvim /etc/nginx/nginx.conf
: 1564298196:0;systemctl restart httpd.service
: 1564298226:0;ls /usr/share/webapps/phppgadmin
: 1564298230:0;ll /usr/share/webapps/phppgadmin
: 1564298389:0;sudo touch /etc/nginx/php.conf
: 1564298407:0;sudo gvim /etc/nginx/php.conf
: 1564298419:0;sudo gvim /etc/nginx/nginx.conf
: 1564298437:0;sudo systemctl restart nginx
: 1564298476:0;sudo gvim /etc/nginx/sites-available/phppgadmin.conf
: 1564298496:0;sudo mkdir /etc/nginx/sites-available/
: 1564298503:0;sudo systemctl restart nginx
: 1564298562:0;sudo gvim /etc/nginx/nginx.conf
: 1564298570:0;sudo systemctl restart nginx
: 1564298628:0;sudo gvim /etc/php/php.ini
: 1564298721:0;sudo systemctl restart nginx
: 1564298725:0;sudo systemctl restart php
: 1564298939:0;sudo gvim /etc/php/php.ini
: 1564299006:0;sudo systemctl restart nginx
: 1564299162:0;sudo systemctl restart php-fpm
: 1564299344:0;ssh -T git@bitbucket.org
: 1564299358:0;ssh -T bitgorated
: 1564299364:0;ssh -T git@bitbucket.org
: 1564299369:0;cd rails
: 1564299371:0;ll
: 1564299377:0;git clone git@bitbucket.org:gorated/chatgenie-erp.git
: 1564299703:0;git clone git@bitbucket.org:gorated/chatgenie-erp.git --depth=5
: 1564299718:0;git clone git@bitbucket.org:gorated/chatgenie-erp.git --jobs-6
: 1564299721:0;git clone git@bitbucket.org:gorated/chatgenie-erp.git --jobs=6
: 1564321754:0;teamocil default
: 1564321757:0;ll -a
: 1564321757:0;neofetch
: 1564321757:0;cd /mnt/personal; ll -a
: 1564330347:0;cd Downloads
: 1564330348:0;ll
: 1564330351:0;cd xdm-2018-x64
: 1564330352:0;ll
: 1564330358:0;cat readme.txt
: 1564330374:0;sudo ./install.sh
: 1564363599:0;teamocil default
: 1564363602:0;ll -a
: 1564363602:0;neofetch
: 1564363602:0;cd /mnt/personal; ll -a
: 1564364460:0;gem install rubocop
: 1564364521:0;gem install solargraph
: 1564364542:0;npm
: 1564364569:0;npm install -g yarn
: 1564364574:0;yarn
: 1564364585:0;rm yarn.lock
: 1564364644:0;ssh -T jcchikikomori@github.com
: 1564364653:0;ssh -T git@github.com
: 1564364695:0;cd /var/www/
: 1564364709:0;git clone git@bitbucket.org:gorated/uniqlo-edm.git uniqlo-edm.localhost
: 1564364768:0;sudo gvim /etc/nginx/nginx.conf
: 1564364843:0;cd
: 1564364846:0;mkdir www
: 1564364848:0;cd www
: 1564364853:0;git clone git@bitbucket.org:gorated/uniqlo-edm.git
: 1564364902:0;cd
: 1564364911:0;sudo systemctl reload nginx
: 1564364954:0;journalctl -xe
: 1564364974:0;ll
: 1564364985:0;cd local.covemanila.com
: 1564364986:0;ll
: 1564364989:0;cd ..
: 1564364997:0;sudo rm -rf local.covemanila.com
: 1564365103:0;sudo systemctl reload nginx
: 1564365194:0;sudo useradd -g www-data $USER
: 1564365262:0;sudo systemctl reload nginx
: 1564365383:0;sudo ln -s /usr/share/webapps/phpMyAdmin/ /usr/share/nginx/html/
: 1564365391:0;sudo systemctl restart nginx
: 1564365427:0;ll /usr/share/webapps/phpMyAdmin/
: 1564365436:0;ifconfig
: 1564365441:0;ipconfig
: 1564365461:0;ip addr
: 1564365517:0;sudo systemctl restart nginx
: 1564365520:0;sudo systemctl restart php-fpm
: 1564365543:0;exec $SHELL
: 1564365545:0;journalctl -xe
: 1564365574:0;ls /usr/share/nginx/html/phpMyAdmin
: 1564365724:0;sudo pacman  �S php[TAB]
: 1564365746:0;sudo pacman -S php-redis
: 1564365753:0;sudo pacman -S redis
: 1564365815:0;cd
: 1564365821:0;sudo chmod -R 755 www
: 1564365847:0;ll www/uniqlo-edm
: 1564365858:0;journalctl -xe
: 1564365931:0;worker_processes 4;
: 1564365966:0;sudo systemctl restart nginx
: 1564365996:0;worker_processes 4;
: 1564365998:0;journalctl -xe
: 1564366089:0;sudo systemctl restart nginx
: 1564366092:0;journalctl -xe
: 1564366139:0;sudo systemctl restart nginx
: 1564366145:0;sudo gvim /etc/nginx/nginx.conf
: 1564366158:0;sudo systemctl restart nginx
: 1564366177:0;sudo useradd -g html $USER
: 1564366204:0;sudo useradd -g www $USER
: 1564366257:0;sudo chown -R www:www www
: 1564366270:0;ps aux|grep nginx|grep -v grep
: 1564366294:0;sudo chown -R $USER:http www
: 1564366307:0;sudo chown -R jccorsanes:http www
: 1564366310:0;ll www
: 1564366326:0;sudo chown -R http:http www
: 1564366331:0;sudo systemctl restart nginx
: 1564366342:0;journalctl -xe
: 1564366365:0;sudo chown -R $USER:$USER www
: 1564366372:0;sudo systemctl restart nginx
: 1564366396:0;ll /usr/share/nginx/html/phpMyAdmin
: 1564366410:0;ll /usr/share/webapps/phppgadmin
: 1564366532:0;sudo systemctl restart nginx
: 1564366565:0;cdmod 755 ./www
: 1564366568:0;chmod 755 ./www
: 1564366602:0;exec $SHELL
: 1564366613:0;sudo ln -s /usr/share/webapps/phppgadmin /usr/share/nginx/html/
: 1564366683:0;gvim index.html
: 1564366765:0;journalctl -xe
: 1564366787:0;chmod 711 /home/jccorsanes
: 1564366813:0;cd www
: 1564367156:0;git clone git@bitbucket.org:gorated/covemanila.live.git
: 1564367441:0;cd .config/Clementine
: 1564367443:0;ll
: 1564367451:0;rm -rf spotifyblob
: 1564367483:0;git status
: 1564367484:0;gs
: 1564367506:0;cd
: 1564367509:0;htop
: 1564367517:0;ll
: 1564367518:0;cd
: 1564367520:0;ll
: 1564368027:0;cat .tmux.conf
: 1564368060:0;cat .byobu/profile.tmux
: 1564368129:0;\
: 1564368165:0;gvim .byobu/profile.tmux
: 1564368263:0;cd www/covemanila.live
: 1564368272:0;git flow
: 1564368474:0;sudo pacman -Sy git-flow
: 1564368525:0;cd
: 1564368531:0;git clone https://aur.archlinux.org/flow-git.git
: 1564368537:0;cd flow-git
: 1564368544:0;makepkg -i
: 1564368555:0;sudo pacman -Sy cargo
: 1564368662:0;sudo pacman -Sy rustup
: 1564368673:0;git flow
: 1564368678:0;makepkg -i
: 1564368867:0;git checkout feature/CM-2-home-page-initial-template
: 1564368935:0;ll
: 1564368995:0;sudo systemctl restart nginx
: 1564369034:0;cd /home/jccorsanes/www/covemanila.live
: 1564369067:0;sudo systemctl reload nginx
: 1564369116:0;journalctl -xe
: 1564369132:0;git flow init
: 1564369137:0;exec $SHELL
: 1564369141:0;git flow init
: 1564369148:0;git flow
: 1564369152:0;git-flow
: 1564369155:0;flow-git
: 1564369258:0;cd ..
: 1564369264:0;rm -rf flow-git
: 1564369267:0;wget -q https://raw.githubusercontent.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installer.sh && sudo bash gitflow-installer.sh install develop; rm gitflow-installer.sh
: 1564369287:0;git flow
: 1564369289:0;git flow init
: 1564369351:0;git checkout development
: 1564369357:0;git flow init
: 1564369372:0;git checkout feature/CM-2-home-page-initial-template
: 1564369420:0;journalctl -xe
: 1564369738:0;curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
: 1564369745:0;chmod +x wp-cli.phar
: 1564369749:0;php wp-cli.phar --info
: 1564369765:0;[200~sudo mv wp-cli.phar /usr/local/bin/wp~
: 1564369768:0;sudo mv wp-cli.phar /usr/local/bin/wp
: 1564369773:0;wp
: 1564369784:0;sudo gvim /etc/php/php.ini
: 1564369812:0;sudo pacman -Sy sqlite3
: 1564369824:0;sudo systemctl restart php-fpm
: 1564369827:0;wp
: 1564369876:0;sudo pacman -Sy php-sqlite
: 1564369887:0;sudo systemctl restart php-fpm
: 1564369889:0;wp
: 1564370557:0;php wp-cli.phar --info
: 1564370565:0;php wp --info
: 1564370569:0;php wp-cli --info
: 1564370574:0;which wp
: 1564370578:0;wp --info
: 1564370657:0;which wp
: 1564370669:0;sudo rm -f /usr/local/bin/wp
: 1564370676:0;git clone https://aur.archlinux.org/wp-cli.git
: 1564370682:0;cd wp-cli
: 1564370684:0;makepkg -i
: 1564370690:0;composer
: 1564370702:0;sudo pacman -Sy composer
: 1564370710:0;makepkg -i
: 1564370725:0;composer
: 1564370834:0;sudo gvim /etc/php/php.ini
: 1564370872:0;sudo systemctl restart php-fpm
: 1564370877:0;sudo systemctl restart nginx.service
: 1564370883:0;journalctl -xe
: 1564370898:0;sudo gvim /etc/nginx/nginx.conf
: 1564370926:0;journalctl -xe
: 1564370940:0;sudo systemctl restart nginx.service
: 1564370965:0;php
: 1564370968:0;php -v
: 1564370970:0;composer
: 1564370977:0;makepkg -i
: 1564371176:0;wp
: 1564371196:0;ll
: 1564371199:0;cd
: 1564371213:0;cd ..
: 1564371215:0;cd uniqlo-edm
: 1564371220:0;git flow init
: 1564371223:0;git status
: 1564371232:0;glog
: 1564371242:0;ll
: 1564371251:0;git reset --hard HEAD
: 1564371255:0;git flow init
: 1564371266:0;glog
: 1564371592:0;gvim .zshrc
: 1564371664:0;curl -L git.io/antigen > antigen.zsh
: 1564371676:0;antigen
: 1564371678:0;exec $SHELL
: 1564371680:0;antigen
: 1564371766:0;touch .antigen-zshrc
: 1564371812:0;gvim .antigen-zshrc
: 1564371993:0;exec $SHELL
: 1564372072:0;gfv
: 1564372078:0;grv
: 1564372106:0;gvim .antigen-zshrc
: 1564372145:0;exec $SHELL
: 1564372293:0;ll
: 1564372307:0;htop
: 1564372323:0;neofetch
: 1564372438:0;glog
: 1564372993:0;cd
: 1564373043:0;gvim .antigen-zshrc
: 1564373116:0;exec $SHELL
: 1564373162:0;gvim .antigen-zshrc
: 1564373190:0;exec $SHELL
: 1564373341:0;php wp --info
: 1564373345:0;wp
: 1564373354:0;wp --info
: 1564373375:0;neofetch
: 1564373538:0;exec $SHELL
: 1564373687:0;sudo gvim /etc/nginx/sites-available/covemanila.conf
: 1564373739:0;sudo nginx -t
: 1564373753:0;sudo systemctl reload nginx
: 1564373966:0;ssh root@123.45.67.890
: 1564373979:0;visudo
: 1564373998:0;sudo visudo
: 1564374093:0;nano /etc/ssh/sshd_config
: 1564374112:0;sudo nano /etc/ssh/sshd_config
: 1564374176:0;sudo systemctl restart sshd
: 1564374199:0;ssh -p jccorsanes@localhost
: 1564374209:0;ssh jccorsanes@localhost
: 1564374267:0;ll /srv/http/
: 1564374275:0;ll /srv
: 1564374286:0;cd /srv/http
: 1564374288:0;mkdir test
: 1564374291:0;exec $SHELL
: 1564374294:0;mkdir test
: 1564374363:0;echo "<?php phpinfo(); ?>" >> test.php
: 1564374367:0;sudo echo "<?php phpinfo(); ?>" >> test.php
: 1564374378:0;sudo touch test.php
: 1564374380:0;sudo echo "<?php phpinfo(); ?>" >> test.php
: 1564374387:0;sudo echo "<?php phpinfo(); ?>" >> sudo test.php
: 1564374398:0;sudo vim test.php
: 1564374430:0;sudo vim test1.php
: 1564374458:0;cd
: 1564374507:0;cd /etc/nginx
: 1564374508:0;ll
: 1564374515:0;sudo su
: 1564374545:0;ll
: 1564374548:0;cd global
: 1564374563:0;sudo vim restrictions.conf
: 1564374627:0;sudo gvim /etc/nginx/nginx.conf
: 1564374642:0;sudo systemctl restart nginx.service
: 1564374670:0;sudo gvim wordpress.conf
: 1564374728:0;sudo pacman -Sy gedit
: 1564374752:0;sudo gedit wordpress.conf
: 1564374952:0;sudo nginx -t
: 1564375627:0;sudo nginx -s
: 1564375631:0;sudo systemctl restart nginx.service
: 1564375655:0;cd
: 1564375678:0;git clone https://gist.github.com/tomii955/7ef5b540996081f7d6e4 wpinstall
: 1564375687:0;cd wpinstall
: 1564375697:0;chmod +x wpinstall.sh
: 1564375701:0;./wpinstall.sh
: 1564375704:0;sudo ./wpinstall.sh
: 1564375734:0;sudo rm -rf /etc/nginx/global
: 1564375735:0;sudo ./wpinstall.sh
: 1564375779:0;sudo mkdir /etc/nginx/sites-enabled
: 1564375781:0;sudo ./wpinstall.sh
: 1564375811:0;sudo systemctl restart nginx.service
: 1564375814:0;journalctl -xe
: 1564375828:0;tail -f journalctl -xe
: 1564375831:0;tail journalctl -xe
: 1564375836:0;tail | journalctl -xe
: 1564375847:0;tail -f | journalctl -xe
: 1564375854:0;sudo systemctl restart nginx.service
: 1564375864:0;journalctl -xe
: 1564375896:0;sudo gedit /etc/nginx/nginx.conf
: 1564375916:0;sudo nginx -t
: 1564375919:0;sudo systemctl restart nginx.service
: 1564375967:0;sudo ./wpinstall.sh
: 1564375985:0;cd
: 1564376031:0;cd /etc/nginx/sites-available
: 1564376031:0;ll
: 1564376042:0;sudo rm -rf com
: 1564376046:0;sudo rm -rf localhost
: 1564376058:0;ll covemanila.com/
: 1564376069:0;ll
: 1564376074:0;sudo rm covemanila.co
: 1564376075:0;sudo rm covemanila.com
: 1564376078:0;sudo rm covemanila.conf
: 1564376094:0;sudo touch covemanila.conf
: 1564376106:0;sudo gedit covemanila.conf
: 1564376201:0;sudo ln -s /etc/nginx/sites-available/covemanila.conf /etc/nginx/sites-enabled/covemanila.conf
: 1564376209:0;ll /etc/nginx/sites-enabled/
: 1564376216:0;cd /etc/nginx/sites-enabled/
: 1564376223:0;sudo rm covemanila.com
: 1564376225:0;cd ..
: 1564376229:0;sudo systemctl restart nginx.service
: 1564376258:0;sudo gedit /etc/nginx/nginx.conf
: 1564376291:0;sudo systemctl restart nginx.service
: 1564376316:0;sudo systemctl restart php-fpm.service
: 1564376375:0;cd sites-available
: 1564376380:0;sudo gedit covemanila.conf
: 1564376407:0;sudo systemctl restart nginx.service
: 1564376414:0;sudo systemctl restart php-fpm.service
: 1564376499:0;sudo systemctl restart nginx.service
: 1564376504:0;journalctl -xe
: 1564376537:0;sudo systemctl restart nginx.service
: 1564376547:0;journalctl -xe
: 1564376708:0;nginx -t
: 1564376738:0;sudo nginx -t
: 1564376742:0;sudo systemctl restart nginx.service
: 1564376787:0;ll /usr/share/nginx/html/
: 1564376792:0;sudo systemctl restart nginx.service
: 1564376796:0;journalctl -xe
: 1564376846:0;sudo systemctl restart nginx.service
: 1564376853:0;journalctl -xe
: 1564376868:0;sudo systemctl restart nginx.service
: 1564376872:0;journalctl -xe
: 1564376904:0;sudo systemctl restart nginx.service
: 1564376907:0;journalctl -xe
: 1564376916:0;sudo systemctl restart nginx.service
: 1564376922:0;journalctl -xe
: 1564376992:0;sudo nginx -t
: 1564376993:0;sudo systemctl restart nginx.service
: 1564377029:0;sudo nginx -t
: 1564377030:0;sudo systemctl restart nginx.service
: 1564377173:0;journalctl -xe
: 1564377227:0;sudo systemctl restart nginx.service
: 1564377253:0;ll /usr/share/nginx/html/
: 1564377292:0;sudo ln -s /home/jccorsanes/www/covemanila.live /usr/share/nginx/html/
: 1564377333:0;sudo nginx -t
: 1564377335:0;sudo ln -s /home/jccorsanes/www/covemanila.live /usr/share/nginx/html/
: 1564377338:0;sudo systemctl restart nginx.service
: 1564377343:0;journalctl -xe
: 1564377417:0;sudo nginx -t
: 1564377419:0;sudo systemctl restart nginx.service
: 1564377433:0;journalctl -xe
: 1564377495:0;sudo systemctl restart nginx.service
: 1564377516:0;journalctl -xe
: 1564377543:0;sudo systemctl restart nginx.service
: 1564377599:0;ll
: 1564377614:0;cd ../uniqlo-edm
: 1564377664:0;sudo gedit /etc/nginx/nginx.conf
: 1564377770:0;sudo nginx -t
: 1564377775:0;sudo systemctl restart nginx.service
: 1564377884:0;cd ..
: 1564377896:0;cd ..; sudo chown -R $USER:www www
: 1564377903:0;cd ..; sudo chown -R jccorsanes:www www
: 1564377909:0;cd jccorsanes
: 1564377911:0;ll
: 1564377919:0;sudo chown -R jccorsanes:www www/
: 1564377926:0;sudo chown -R jccorsanes:http www/
: 1564378017:0;sudo chown -R www-data:www-data www/
: 1564378025:0;sudo chown -R http:http www/
: 1564379418:0;sudo usermod -aG http $USER
: 1564379448:0;sudo chown -R $USER:http www/
: 1564379454:0;sudo chown -R jccorsanes:http www/
: 1564379495:0;cd www/covemanila.live
: 1564379497:0;git status
: 1564379690:0;sudo chown -R $USER:$USER .git
: 1564379695:0;git status
: 1564379731:0;gd
: 1564379757:0;git rm importbuddy
: 1564379759:0;git rm importbuddy/
: 1564379762:0;ll
: 1564379765:0;git status
: 1564379824:0;rm -rf importbuddy
: 1564379828:0;git status
: 1564380001:0;sudo pacman -Sy php-pear
: 1564380021:0;which pear
: 1564380022:0;pear install PHP_CodeSniffer
: 1564380056:0;pear channel-update pear.php.net
: 1564380063:0;sudo pear channel-update pear.php.net
: 1564380068:0;pear install PHP_CodeSniffer
: 1564380074:0;sudo pear install PHP_CodeSniffer
: 1564380086:0;cd $(pear config-get php_dir)/PHP/CodeSniffer/Standards
: 1564380102:0;cd /usr/share/pear/PHP/CodeSniffer/src/Standards
: 1564380112:0;git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
: 1564380118:0;sudo -i
: 1564380136:0;sudo su
: 1564380148:0;ll
: 1564380153:0;sudo ln -s WordPress-Coding-Standards/WordPress WordPress
: 1564380162:0;sudo ln -s WordPress-Coding-Standards/WordPress-Core WordPress-Core
: 1564380170:0;ln -s WordPress-Coding-Standards/WordPress-VIP WordPress-VIP
: 1564380174:0;sudo ln -s WordPress-Coding-Standards/WordPress-VIP WordPress-VIP
: 1564380181:0;sudo ln -s WordPress-Coding-Standards/WordPress-Extra WordPress-Extra
: 1564380286:0;which phpcs
: 1564380366:0;cd
: 1564380375:0;sudo pear remove PHP_CodeSniffer
: 1564380380:0;sudo pear uninstall PHP_CodeSniffer
: 1564380394:0;cd /usr/share/pear/PHP/CodeSniffer/src/Standards
: 1564380397:0;ll
: 1564380424:0;sudo rm WordPress
: 1564380432:0;sudo rm WordPress-Core
: 1564380436:0;sudo rm WordPress-Extra
: 1564380438:0;ll
: 1564380442:0;sudo rm WordPress-VIP
: 1564380443:0;ll
: 1564380451:0;sudo rm -rf WordPress-Coding-Standards
: 1564380453:0;cd
: 1564380497:0;composer global require "squizlabs/php_codesniffer=*"
: 1564380536:0;git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
: 1564380552:0;phpcs
: 1564380556:0;exec $SHELL
: 1564380563:0;phpcs
: 1564380571:0;composer
: 1564380584:0;php phpcs
: 1564380609:0;cat .zshr
: 1564380611:0;cat .zshrc
: 1564380616:0;cat ~/.zshrc
: 1564380651:0;gedit ~/.zshrc
: 1564380691:0;source ~/.zshrc
: 1564380729:0;echo $PATH
: 1564380738:0;exec $SHELL
: 1564380750:0;phpcs
: 1564380758:0;exec $SHELL
: 1564380782:0;phpcs --config-set installed_paths ~/WordPress-Coding-Standards
: 1564380798:0;phpcs -i
: 1564380874:0;which phpcs
: 1564380948:0;gedit ~/.zshrc
: 1564380969:0;gedit ~/.bash_profile
: 1564380978:0;gedit ~/.bashrc
: 1564380995:0;echo $GAGO
: 1564381010:0;echo $YAOURT_COLORSGAGO
: 1564381014:0;echo $YAOURT_COLORS
: 1564381052:0;gedit ~/.profile
: 1564381154:0;brew install phpcs
: 1564381193:0;composer global require friendsofphp/php-cs-fixer
: 1564381247:0;php-cs-fixer
: 1564381301:0;exec $SHELL
: 1564381312:0;echo $PATH
: 1564381384:0;which phpcs
: 1564381982:0;git status
: 1564382217:0;ll
: 1564383274:0;cat /etc/sysctl.d/99-sysctl.conf
: 1564383280:0;ll /etc/sysctl.d
: 1564383290:0;sudo touch /etc/sysctl.d/99-sysctl.conf
: 1564383313:0;sudo gedit /etc/sysctl.d/99-sysctl.conf
: 1564383398:0;sudo sysctl -p
: 1564383401:0;sudo sysctl
: 1564383453:0;sudo systemctl restart systemd-sysctl
: 1564383626:0;sudo chown -R http:http wp-content/uploads
: 1564383637:0;cd ..
: 1564383645:0;sudo chown http:http covemanila.live
: 1564383650:0;cd covemanila.live
: 1564383654:0;git status
: 1564383662:0;ll
: 1564383677:0;ll wp-content
: 1564383681:0;cd
: 1564383684:0;cd www/
: 1564383687:0;cd covemanila.live
: 1564383870:0;git status
: 1564383876:0;git checkoit -- .htaccess
: 1564383879:0;git checkout -- .htaccess
: 1564383882:0;sudo git checkout -- .htaccess
: 1564383886:0;ll
: 1564383890:0;l -a
: 1564384034:0;sudo gedit /etc/nginx/nginx.conf
: 1564384218:0;sudo pacman -Sy python3
: 1564384481:0;sudo nginx -t
: 1564384488:0;sudo systemctl restart systemd-sysctl
: 1564384495:0;sudo systemctl restart nginx.service
: 1564384720:0;sudo nginx -t
: 1564384722:0;sudo systemctl restart nginx.service
: 1564384761:0;sudo nginx -t
: 1564384762:0;sudo systemctl restart nginx.service
: 1564384837:0;sudo nginx -t
: 1564384840:0;sudo systemctl restart nginx.service
: 1564384865:0;journalctl -xe
: 1564384979:0;sudo systemctl restart php-fpm.service
: 1564385384:0;sudo nginx -t
: 1564385408:0;sudo systemctl restart php-fpm.service
: 1564385416:0;journalctl -xe
: 1564385467:0;sudo systemctl restart php-fpm.service
: 1564385474:0;sudo systemctl restart nginx.service
: 1564385480:0;journalctl -xe
: 1564385493:0;sudo systemctl restart nginx.service
: 1564385707:0;wp
: 1564385718:0;wp plugin
: 1564385723:0;wp plugin list
: 1564385729:0;wp plugin
: 1564385738:0;wp plugin deactivate --all
: 1564385824:0;wp plugin activate --all
: 1564385831:0;wp plugin list
: 1564385839:0;git status
: 1564385937:0;git reset --hard HEAD; git clean -f
: 1564385940:0;sudo git reset --hard HEAD; git clean -f
: 1564385948:0;sudo git clean -f
: 1564385952:0;git status
: 1564386010:0;SUDO CODE
: 1564386013:0;sudo code
: 1564386063:0;git status
: 1564386077:0;gd
: 1564386144:0;git status
: 1564386154:0;ga wp-content/themes/
: 1564386176:0;cd wp-content/themes/covemanila-2019/css
: 1564386177:0;ll
: 1564386189:0;mv dynamic_avia.min.css dynamic_avia.css
: 1564386190:0;ll
: 1564386195:0;ga dynamic_avia.css
: 1564386197:0;git status
: 1564386208:0;git reset HEAD dynamic_avia.min.css
: 1564386211:0;git status
: 1564386215:0;cd ..
: 1564386216:0;cd..
: 1564386219:0;cd ..
: 1564386225:0;ll
: 1564386228:0;git status
: 1564387029:0;git clone https://aur.archlinux.org/font-manager.git
: 1564387036:0;cd font-manager
: 1564387041:0;man makepkg
: 1564387078:0;makepkg -i
: 1564387131:0;sudo pacman -Sy yelp-tools gobject-introspection vala meson ninja
: 1564387503:0;makepkg -i
: 1564387735:0;sudo pacman -Sy fontconfig
: 1564387758:0;makepkg -i
: 1564387823:0;makepkg -i --nodeps
: 1564387918:0;sudo pacman -Sy cmake
: 1564387936:0;makepkg -i --nodeps
: 1564387941:0;makepkg -i
: 1564387956:0;fontconfig
: 1564387963:0;brew install fontconfig
: 1564388078:0;cat /etc/pacman.conf
: 1564388087:0;ll
: 1564388278:0;git clone https://aur.archlinux.org/fontconfig-git.git
: 1564388285:0;cd fontconfig-git
: 1564388288:0;makepkg -i
: 1564388382:0;makepkg -i -d
: 1564388407:0;cd ..
: 1564388413:0;makepkg -i -d
: 1564388420:0;cd fontconfig-git
: 1564388436:0;makepkg -i -d
: 1564388440:0;makepkg -i
: 1564388450:0;sudo pacman -Sy gperf
: 1564388477:0;makepkg -i -d
: 1564388594:0;which fontconfgi
: 1564388596:0;which fontconfig
: 1564388602:0;cd ..
: 1564388604:0;makepkg -i -d
: 1564388669:0;cd
: 1564388673:0;cd Desktop/COVEMANILA
: 1564388683:0;sudo pacman -Syu fontconfig
: 1564388705:0;mv Optimale\ Bold.ttf /usr/share/fonts
: 1564388709:0;sudo mv Optimale\ Bold.ttf /usr/share/fonts
: 1564389980:0;cd
: 1564390019:0;ll /tmp
: 1564390037:0;ll /tmp | grep log
: 1564390082:0;cd www/covemanila.live/wp-content
: 1564390091:0;mkdir tmp
: 1564390093:0;cd tmp
: 1564390096:0;git status
: 1564390108:0;ll
: 1564390121:0;touch wp-errors.log
: 1564390125:0;ll
: 1564390128:0;git status
: 1564390140:0;sudo systemctl restart nginx.service
: 1564390150:0;ll
: 1564393260:0;cd
: 1564393267:0;journalctl -xe
: 1564393471:0;tail -f /var/log/nginx/nginx_error.log
: 1564393478:0;tail -f /var/log/nginx/access.log
: 1564393555:0;tail -f /var/log/nginx/error.log
: 1564393873:0;sudo gedit /etc/nginx/nginx.conf
: 1564393971:0;sudo nginx -t
: 1564394006:0;sudo systemctl restart nginx.service
: 1564394062:0;tail -f /var/log/nginx/error.log
: 1564394093:0;sudo nginx -t
: 1564394099:0;sudo systemctl restart nginx.service
: 1564394150:0;tail -f /var/log/nginx/error.log
: 1564394494:0;sudo nginx -t
: 1564394500:0;sudo systemctl restart nginx.service
: 1564394503:0;sudo systemctl restart php-fpm.service
: 1564394553:0;tail -f /var/log/nginx/error.log
: 1564399355:0;tail -f /var/log/nginx/access.log
: 1564399598:0;sudo pacman -Sy multitail
: 1564399648:0;multitail -c /var/log/nginx/access.log
: 1564399719:0;multitail /var/log/nginx/access.log
: 1564405107:0;git status
: 1564405116:0;gaa
: 1564405129:0;ll
: 1564405132:0;ll -a
: 1564405137:0;sudo gaa
: 1564405150:0;sudo git add -A
: 1564405156:0;git status
: 1564405179:0;git reset HEAD wp-content/plugins/backwpup/
: 1564405184:0;git status
: 1564405272:0;git commit -m "Disabled Dynamic Avia CSS & fixed themes"
: 1564405276:0;sudo git commit -m "Disabled Dynamic Avia CSS & fixed themes"
: 1564405282:0;git commit -m "Disabled Dynamic Avia CSS & fixed themes"
: 1564405291:0;glog
: 1564405360:0;git status
: 1564405364:0;ggp
: 1564407772:0;neofetch
: 1564408206:0;free
: 1564408211:0;neofetch
: 1564408248:0;free
: 1564413325:0;cd /mnt/personal
: 1564413336:0;cd Downloads
: 1564413346:0;cd NieR\ -\ Automata\ \[FitGirl\ Repack\]
: 1564413357:0;md5sum setup-fitgirl-01.bin
: 1564413383:0;cat MD5/fitgirl-bins.md5
: 1564456854:0;teamocil default
: 1564456858:0;neofetch
: 1564456858:0;ll -a
: 1564456858:0;cd /mnt/personal; ll -a
: 1564456884:0;cd www/uniqlo-edm
: 1564457313:0;git flow feature start w49-OUTERWEAR
: 1564457325:0;mkdir w49-OUTERWEAR
: 1564457327:0;mkdir w49-OUTERWEAR/files
: 1564458025:0;git status
: 1564458027:0;gaa
: 1564458175:0;git branch | grep \* | cut -d ' ' -f2
: 1564458196:0;git rev-parse --abbrev-ref HEAD
: 1564458211:0;git rev-parse --abbrev-ref HEAD | grep /
: 1564458215:0;git rev-parse --abbrev-ref HEAD | grep /*
: 1564458217:0;git rev-parse --abbrev-ref HEAD | grep /
: 1564458225:0;git rev-parse --abbrev-ref HEAD | grep / | cut feature/
: 1564458230:0;git rev-parse --abbrev-ref HEAD | grep / | cut 'feature/'
: 1564458234:0;git rev-parse --abbrev-ref HEAD | grep / | cut "feature"
: 1564458244:0;git rev-parse --abbrev-ref HEAD | grep / | cut -d 'feature/'
: 1564458247:0;git rev-parse --abbrev-ref HEAD | grep / | cut -d 'feature'
: 1564458251:0;git rev-parse --abbrev-ref HEAD | grep / | cut -d '/'
: 1564458254:0;git rev-parse --abbrev-ref HEAD | grep / | cut -d ''
: 1564458256:0;git rev-parse --abbrev-ref HEAD | grep / | cut -d ' '
: 1564458265:0;git rev-parse --abbrev-ref HEAD | grep / | cut "feature" -f2
: 1564458270:0;git sttaus
: 1564458273:0;git status
: 1564458280:0;gaa
: 1564458289:0;./build_unix.sh
: 1564458668:0;lsof | grep /mnt/personal
: 1564458680:0;cd
: 1564458683:0;lsof | grep /mnt/personal
: 1564458803:0;sugo gedit /etc/fstab
: 1564458807:0;sudo gedit /etc/fstab
: 1564459199:0;sudo chown -R $USER:$USER /mnt/personal
: 1564459226:0;sudo gedit /etc/fstab
: 1564459491:0;id
: 1564459707:0;ll -a /mnt/personal
: 1564460043:0;teamocil default
: 1564460056:0;neofetch
: 1564460056:0;ll -a
: 1564460056:0;cd /mnt/personal; ll -a
: 1564460069:0;sudo umount /mnt/personal
: 1564460078:0;cd
: 1564460081:0;sudo umount /mnt/personal
: 1564460088:0;mount --help
: 1564460207:0;cd www/uniqlo-edm
: 1564460209:0;git status
: 1564460212:0;gaa
: 1564460214:0;./build_unix.sh
: 1564460845:0;git clone https://aur.archlinux.org/intellij-idea-ultimate-edition.git
: 1564460852:0;cd intellij-idea-ultimate-edition
: 1564460860:0;git checkout e51867998b99b17bd9ce39867cce3250a3bee881
: 1564460868:0;makepkg -i
: 1564460913:0;git checkout 60c9f0a88b1f0a8b1c132138c035bb8d5d258b63
: 1564460915:0;makepkg -i
: 1564460949:0;git checkout master
: 1564460950:0;makepkg -i
: 1564461062:0;cd
: 1564461065:0;cd idea-IU-181.5087.20
: 1564461066:0;ll
: 1564461071:0;cat Install-Linux-tar.txt
: 1564461090:0;cd bin
: 1564461095:0;./idea.sh
: 1564462217:0;cd www/
: 1564462219:0;ll -a
: 1564462238:0;sudo chown jccorsanes:http
: 1564462250:0;sudo chown jccorsanes:http covemanila.live
: 1564462538:0;cd covemanila.live
: 1564462541:0;git status
: 1564462614:0;cd /etc/nginx/
: 1564462616:0;ll
: 1564462630:0;sudo gedit sites-available/covemanila.conf
: 1564462702:0;sudo nginx -t
: 1564462714:0;sudo systemctl restart nginx.service
: 1564462850:0;wp option update siteurl 'http://localhost:11000'
: 1564462925:0;sudo nginx -t
: 1564462927:0;sudo systemctl restart nginx.service
: 1564462944:0;sudo nginx -t
: 1564462945:0;sudo systemctl restart nginx.service
: 1564462975:0;cd
: 1564462978:0;multitail /var/log/nginx/access.log
: 1564463288:0;sudo snap install slack
: 1564463296:0;sudo snap install slack --classic
: 1564463309:0;gedit ~/.teamocil/default.yml
: 1564463410:0;journalctl -xe | multitail
: 1564463464:0;multitail -l "journalctl -f -u postfix" -L "journalctl -f -u nagios"
: 1564463475:0;multitail -l "journalctl -f -u postfix"
: 1564463482:0;multitail -l "journalctl -f -u jccorsanes"
: 1564463500:0;multitail -l "journalctl -f -u" -c
: 1564463530:0;multitail -l "journalctl -f" -c
: 1564463627:0;teamocil default
: 1564463631:0;cd www; ls -a
: 1564463631:0;neofetch
: 1564463631:0;multitail -l "journalctl -f" -c
: 1564463631:0;cd www; ll -a
: 1564463631:0;cd /mnt/personal; ll -a
: 1564463631:0;cd /media; ll -a
: 1564463663:0;gedit ~/.teamocil/default.yml
: 1564463684:0;teamocil default
: 1564463687:0;multitail -l "journalctl -f" -c
: 1564463687:0;neofetch
: 1564463687:0;cd /mnt/personal; ll -a
: 1564463687:0;cd www; ll -a
: 1564463687:0;cd /media; ll -a
: 1564463697:0;gedit ~/.teamocil/default.yml
: 1564463735:0;teamocil default
: 1564463737:0;neofetch
: 1564463737:0;cd www; ll -a
: 1564463737:0;multitail -l "journalctl -f" -c
: 1564463737:0;cd /mnt/personal; ll -a
: 1564463753:0;ll -a
: 1564463755:0;cd covemanila.live
: 1564463762:0;cd ../uniqlo-edm
: 1564463764:0;ll
: 1564463767:0;ll -a
: 1564463769:0;git status
: 1564463772:0;git commit
: 1564463803:0;ggp
: 1564464165:0;ssh -T git@bitbucket.org
: 1564464177:0;ssh -T git@bitgorated
: 1564464183:0;ssh -T git@bitbucket.org
: 1564464197:0;ssh -T git@bitbucket.org:gorated
: 1564464205:0;ssh -T git@gorated.bitbucket.org
: 1564464255:0;gedit .ssh/config
: 1564464321:0;sudo systemctl restart sshd
: 1564464326:0;ggp
: 1564464336:0;grv
: 1564464342:0;git push
: 1564464356:0;git push --set-upstream origin feature/w49-OUTERWEAR
: 1564464364:0;which ggp
: 1564464454:0;cat .ssh/id_rsa_bb.pub
: 1564464465:0;ssh -T bitgorated
: 1564464527:0;gedit .ssh/config
: 1564464545:0;sudo systemctl restart sshd
: 1564464546:0;ggp]
: 1564464548:0;ggp
: 1564464553:0;exec $SHELL
: 1564464556:0;ggp
: 1564464575:0;sudo systemctl restart sshd
: 1564464579:0;exec $SHELL
: 1564464581:0;ggp
: 1564464597:0;ssh -T bitbucket.org
: 1564464615:0;grv
: 1564464637:0;sudo systemctl restart sshd
: 1564464639:0;ggp
: 1564464650:0;git push --set-upstream origin feature/w49-OUTERWEAR -v
: 1564464789:0;sudo systemctl restart sshd
: 1564464792:0;ggp
: 1564464801:0;ggp -v
: 1564464818:0;`eval "$(ssh-agent -s)"`
: 1564464826:0;eval "$(ssh-agent -s)"
: 1564464833:0;kill -9 7425
: 1564464841:0;ssh -T bitbucket.org
: 1564464866:0;ssh -T bitbucket.org -u git
: 1564464874:0;ssh -T bitbucket.org -U git
: 1564464893:0;ssh -T git@bitbucket.org:gorated
: 1564464896:0;ssh -T git@bitbucket.org
: 1564464919:0;eval "$(ssh-agent -s)"
: 1564464924:0;kill -9 8351
: 1564464930:0;ssh -T git@bitbucket.org
: 1564464958:0;ssh -T bitgorated
: 1564464964:0;ssh -T git@bitbucket.org
: 1564464979:0;sudo systemctl restart sshd
: 1564464982:0;ssh -T git@bitbucket.org
: 1564464986:0;ssh -T bitgorated
: 1564465037:0;sudo systemctl restart sshd
: 1564465039:0;ssh -T git@bitbucket.org
: 1564465047:0;ssh -T johncyrill@bitbucket.org
: 1564465234:0;ssh-add -l
: 1564465249:0;sudo systemctl restart sshd
: 1564465260:0;ssh-add -l
: 1564465280:0;ssh -T johncyrill@bitbucket.org
: 1564465287:0;ssh -T git@bitbucket.org
: 1564465295:0;ssh -T git@github.com
: 1564465306:0;ssh-add id_rsa_gorated
: 1564465312:0;ssh-add .ssh/id_rsa_gorated
: 1564465321:0;ssh-add -l
: 1564465328:0;ssh -T git@bitbucket.org
: 1564465337:0;ggp
: 1564465359:0;ssh-add .ssh/id_rsa_bb
: 1564465363:0;ssh-add -l
: 1564465375:0;ssh -T bitgorated
: 1564465383:0;ssh -T git@bitbucket.org
: 1564465389:0;exec $SHELL
: 1564465394:0;ssh -T git@bitbucket.org
: 1564465398:0;ggp
: 1564465484:0;gedit .profile
: 1564465623:0;exec $SHELL
: 1564465628:0;gfa
: 1564465635:0;glog
: 1564465661:0;neofetch
: 1564466558:0;git status
: 1564466590:0;ll -a wp-content/themes/covemanila-2019
: 1564466596:0;ll -a
: 1564466617:0;sudo chown -R $USER:$USER wp-content/themes/covemanila-2019
: 1564466646:0;git status
: 1564467034:0;gaa
: 1564467036:0;git status
: 1564467269:0;glog
: 1564468801:0;sudo chown -R $USER:$USER covemanila.live.ipr
: 1564468808:0;ll -a
: 1564468819:0;git status
: 1564468829:0;cd ..
: 1564468848:0;sudo chown jccorsanes:http covemanila.live
: 1564468853:0;ll -a
: 1564468868:0;sudo chown http:http covemanila.live
: 1564470887:0;sudo chown jccorsanes:http covemanila.live
: 1564470900:0;cd covemanila.live
: 1564470901:0;ll
: 1564470905:0;git status
: 1564472227:0;ga wp-content/themes/covemanila-2019/css/custom.css
: 1564472231:0;git status
: 1564472245:0;ga wp-content/themes/covemanila-2019/footer.php
: 1564472247:0;git status
: 1564472265:0;rm wp-content/themes/covemanila-2019/css/dynamic_avia.css
: 1564472276:0;git status
: 1564472293:0;git checkout -- importbuddy.php
: 1564472294:0;git status
: 1564472302:0;gd
: 1564472324:0;gd | grep wp-content
: 1564472374:0;multitail -l "journalctl -f" -L "journalctl -f -u http" -c
: 1564472390:0;git status
: 1564472401:0;ga wp-content/themes/covemanila-2019/css/dynamic_avia.css
: 1564472406:0;git status
: 1564472448:0;gd wp-content/themes/covemanila-2019/css/footer.css
: 1564473425:0;git flow feature finish w49-OUTERWEAR
: 1564473439:0;git push --all
: 1564479658:0;multitail /var/log/nginx/access.log -c
: 1564479665:0;multitail /var/log/nginx/access.log
: 1564479702:0;multitail /var/log/nginx/error.log
: 1564479829:0;multitail -c /var/log/nginx/error.log
: 1564479844:0;multitail /var/log/nginx/error.log
: 1564479859:0;sudo gedit sites-available/covemanila.conf
: 1564479886:0;sudo gedit /etc/nginx/sites-available/covemanila.conf
: 1564480058:0;sudo nginx -t
: 1564480081:0;sudo systemctl reload nginx
: 1564481455:0;gedit ~/.teamocil/default.yml
: 1564481510:0;teamocil rails
: 1564481515:0;neofetch
: 1564481516:0;cd rails; ll -a
: 1564481516:0;cd /mnt/personal; ll -a
: 1564481516:0;multitail -l "journalctl -f" -c
: 1564481637:0;git clone git clone git@bitbucket.org:gorated/chatgenie-erp-bot.git
: 1564481640:0;git clone git@bitbucket.org:gorated/chatgenie-erp-bot.git
: 1564481684:0;cd chatgenie-erp-bot
: 1564481700:0;bundle i
: 1564481718:0;rbenv install 2.5.3
: 1564481787:0;git status
: 1564482946:0;cd
: 1564482953:0;cat .ssh/id_rsa.pub
: 1564486453:0;gedit .ssh/config
: 1564486538:0;sudo systemctl restart sshd
: 1564486549:0;ssh staging-cove-manila
: 1564486603:0;curl -LO https://deployer.org/deployer.phar
: 1564486611:0;mv deployer.phar /usr/local/bin/dep
: 1564486615:0;sudo mv deployer.phar /usr/local/bin/dep
: 1564486621:0;chmod +x /usr/local/bin/dep
: 1564486626:0;dep
: 1564486691:0;git status
: 1564486865:0;ssh covemani@143.95.229.31
: 1564486894:0;gedit .ssh/config
: 1564486919:0;git status
: 1564487353:0;gaa
: 1564487354:0;git status
: 1564487379:0;git commit -m "Deleted fixed avia css & improved styles fo Home & Event Calendar"
: 1564487388:0;glog
: 1564487394:0;git status
: 1564487400:0;sudo git commit -m "Deleted fixed avia css & improved styles fo Home & Event Calendar"
: 1564487411:0;git log
: 1564487420:0;git status
: 1564487431:0;ll -a .git
: 1564487438:0;ll -a .git/objects
: 1564487453:0;sudo chown -R $USER:$USER .git/objects
: 1564487458:0;git commit -m "Deleted fixed avia css & improved styles fo Home & Event Calendar"
: 1564487461:0;glog
: 1564487464:0;ggp
: 1564496335:0;ssh -T git@bitbucket.org
: 1564496358:0;which youtube-dl
: 1564496514:0;youtube-dl 'https://www.youtube.com/watch?v=NL2aGz8Jv48' --formats
: 1564496528:0;youtube-dl 'https://www.youtube.com/watch?v=NL2aGz8Jv48' --list
: 1564496534:0;youtube-dl 'https://www.youtube.com/watch?v=NL2aGz8Jv48' --list-formats
: 1564496639:0;youtube-dl 'https://www.youtube.com/watch?v=NL2aGz8Jv48' -f 313+bestaudio
: 1564497765:0;youtube-dl
: 1564497768:0;youtube-dl --help
: 1564497865:0;youtube-dl 'https://youtu.be/SDPh6Dpc9ww' --list-formats
: 1564497924:0;youtube-dl 'https://youtu.be/SDPh6Dpc9ww' -f 248+bestaudio -o 'Homemade Chicken Joy (Fast Food at Home).webm'
: 1564539706:0;teamocil default
: 1564539711:0;cd www; ll -a
: 1564539711:0;neofetch
: 1564539711:0;multitail -l "journalctl -f" -c
: 1564539711:0;cd /mnt/personal; ll -a
: 1564539726:0;git clone https://aur.archlinux.org/barrier.git
: 1564539732:0;cd barrier
: 1564539735:0;makepkg -i
: 1564539870:0;sudo pacman -Sy avahi
: 1564539887:0;makepkg -i
: 1564539955:0;pacman -Qo $(find /usr | grep libdns) | grep avahi
: 1564539976:0;sudo pacman -Qo $(find /usr | grep libdns) | grep avahi
: 1564540062:0;git tags
: 1564540064:0;git tag
: 1564540072:0;glog
: 1564540080:0;git tag 2.3.0
: 1564540083:0;glog
: 1564540089:0;git tag
: 1564540097:0;git checkout 2.3.0
: 1564540100:0;glog
: 1564540106:0;git checkout master
: 1564540108:0;git status
: 1564540114:0;git reset --hard HEAD
: 1564540117:0;git status
: 1564540151:0;cd
: 1564540156:0;sudo snap install barrier
: 1564540276:0;sudo pacman -Sy avahi
: 1564540288:0;cd barrier
: 1564540290:0;makepkg -i
: 1564540295:0;makepkg -i -d
: 1564540346:0;makepkg -i -qt5
: 1564540350:0;makepkg -i -o -qt5
: 1564540436:0;cd ..
: 1564540441:0;rm -rf barrier
: 1564540444:0;git clone git@github.com:debauchee/barrier.git
: 1564540636:0;git clone git@github.com:debauchee/barrier.git --depth=1
: 1564540721:0;cd barrier
: 1564540745:0;./clean_build.sh -qt5
: 1564540777:0;cd cmake
: 1564540778:0;ll
: 1564540781:0;cd ..
: 1564541019:0;sudo pacman -S flatpak
: 1564541033:0;cd covemanila.live
: 1564541319:0;git status
: 1564541342:0;./clean_build.sh +qt5
: 1564541454:0;cat clean_build.sh
: 1564541505:0;cmake3
: 1564541508:0;cmake -v
: 1564541515:0;cmake --version
: 1564541530:0;cmake +qt5
: 1564541535:0;cmake . +qt5
: 1564541541:0;cmake -qt5
: 1564541551:0;cmake src
: 1564541558:0;ll src
: 1564541567:0;git status
: 1564541604:0;flathub com.github.debauchee.barrier
: 1564541641:0;sudo pacman -S qt5-base
: 1564541795:0;reboot now
: 1564541800:0;reboot
: 1564542416:0;teamocil default
: 1564542420:0;neofetch
: 1564542420:0;cd www; ll -a
: 1564542420:0;cd /mnt/personal; ll -a
: 1564542420:0;multitail -l "journalctl -f" -c
: 1564542421:0;flathub com.github.debauchee.barrier
: 1564542429:0;neofetch
: 1564542466:0;flatpak install flathub com.github.debauchee.barrier
: 1564543572:0;cd covemanila.live
: 1564543891:0;git status
: 1564543897:0;glog
: 1564544079:0;git checkout -b feature/theme-improvements-1
: 1564544102:0;git checkout feature/CM-2-home-page-initial-template
: 1564544188:0;git status
: 1564546527:0;flatpak run barrier
: 1564546543:0;flatpak run com.github.debauchee.barrier
: 1564546585:0;neofetch
: 1564546934:0;htop
: 1564547000:0;sudo swapoff -a
: 1564547028:0;htop -d 0.5
: 1564547036:0;htop -d 0.8
: 1564547039:0;htop -d 0.1
: 1564547042:0;htop -d 1
: 1564547046:0;htop -d 2
: 1564547051:0;htop -d 5
: 1564547244:0;cat /etc/sysctl.d/99-sysctl.conf
: 1564547250:0;neofetch
: 1564548134:0;cat wp-content/themes/covemanila-2019/footer.php
: 1564551581:0;flatpak run com.github.debauchee.barrier
: 1564551833:0;flatpak stop com.github.debauchee.barrier
: 1564551839:0;flatpa
: 1564551840:0;flatpak
: 1564551843:0;flatpak --help
: 1564551852:0;flatpak kill com.github.debauchee.barrier
: 1564551857:0;flatpak run com.github.debauchee.barrier
: 1564551966:0;htop -d 2
: 1564551991:0;htop -d 4
: 1564552002:0;htop -d 5
: 1564552009:0;git status
: 1564552233:0;sudo pacman -Syu pulseeffects
: 1564555511:0;flatpak list
: 1564555520:0;flatpak remove
: 1564555532:0;flatpak remove com.github.debauchee.barrier
: 1564555551:0;flatpak remove org.kde.*
: 1564555555:0;flatpak remove 'org.kde.*'
: 1564555559:0;flatpak remove org.kde
: 1564555575:0;sudo snap install barrier-kvm
: 1564558482:0;cat /proc/sys/vm/swappiness
: 1564558539:0;service procps start
: 1564558559:0;sudo gedit /etc/sysctl.d/99-sysctl.conf
: 1564558609:0;sudo sysctl -p /etc/sysctl.d/99-sysctl.conf
: 1564558625:0;sudo swapon -a
: 1564558666:0;sudo pacman -S mesa-demos
: 1564558673:0;glxinfo | grep direct
: 1564558694:0;sudo gedit /etc/sysctl.d/99-sysctl.conf
: 1564558756:0;sudo sysctl -p /etc/sysctl.d/99-sysctl.conf
: 1564558763:0;sudo pacaur -S ananicy-git
: 1564558776:0;sudo pacman -S pacaur
: 1564558783:0;sudo pacaur -S ananicy-git
: 1564558787:0;pacaur -S ananicy-git
: 1564559043:0;cat /etc/ananicy.d
: 1564559048:0;ll -s /etc/ananicy.d
: 1564559051:0;ll -a /etc/ananicy.d
: 1564559059:0;cat /etc/ananicy.d/ananicy.conf
: 1564559247:0;gedit /usr/share/applications/blueman-manager.desktop
: 1564559322:0;sudo gedit /usr/share/applications/blueman-manager.desktop
: 1564559339:0;which ionice
: 1564559385:0;sudo gedit /usr/share/applications/blueman-manager.desktop
: 1564559438:0;ionice -c 3 -n 7 blueman-manager && cpulimit -b -e blueman-manager -l 10
: 1564559464:0;sudo pacaur -S cpulimit-git
: 1564559481:0;pacaur -S cpulimit-git
: 1564559617:0;ionice -c 3 -n 7 blueman-manager && cpulimit -b -e blueman-manager -l 10
: 1564559636:0;ionice -c 3 -n 7 blueman-manager && cpulimit -e blueman-manager -l 10
: 1564559664:0;blueman-manager --help
: 1564559727:0;cat /etc/ananicy.d/00-default/chromium.rules
: 1564559732:0;cd
: 1564559736:0;neofetch
: 1564559760:0;git status
: 1564559765:0;gaa
: 1564559769:0;git status
: 1564559792:0;git reset HEAD wp-content/themes/covemanila-2019/css/components/contact-us.css
: 1564559795:0;git status
: 1564559802:0;gd wp-content/themes/covemanila-2019/css/components/contact-us.css
: 1564559813:0;gaa
: 1564559815:0;git status
: 1564559855:0;git commit -m "Content & Footer UI improvements"
: 1564559858:0;ggp
: 1564559881:0;git checkout feature/theme-improvements-1
: 1564559892:0;which gc
: 1564559895:0;which gsync
: 1564559933:0;git pull origin feature/CM-2-home-page-initial-template --merge
: 1564559946:0;git pull origin feature/CM-2-home-page-initial-template --rebase
: 1564559957:0;glog
: 1564561709:0;barrier-kvm
: 1564561956:0;sudo pacman -S dropbox
: 1564561968:0;sudo pacaur -S dropbox-git
: 1564561972:0;pacaur -S dropbox-git
: 1564561986:0;pacaur -S dropbox
: 1564566397:0;which xclip
: 1564566413:0;pacaur -S xclip
: 1564566438:0;cat .tmux.conf
: 1564566443:0;cat .tmux
: 1564566448:0;ll .tmux
: 1564566455:0;ll -a
: 1564566482:0;cat antigen.zsh
: 1564566525:0;cat .zshrc | xclip
: 1564566631:0;xclip .zshrc
: 1564566654:0;xclip --help
: 1564566657:0;xclip
: 1564566759:0;xclip -sel clip < .zshrc
: 1564566789:0;xclip -sel clip < .antigen-zshrc
: 1564566807:0;xclip -sel clip < antigen.zsh
: 1564566829:0;xclip -sel clip < .bashrc
: 1564566840:0;xclip -sel clip < .bash_profile
: 1564566856:0;xclip -sel clip < .profile
: 1564566917:0;ll
: 1564566920:0;ll -a
: 1564566932:0;xclip -sel clip < .zsh_history
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH:$HOME/.config/composer/vendor/bin
# export PATH=$PATH:$HOME/.config/composer/vendor/bin
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Override profile
source ~/.profile
# teamocil
compctl -g '~/.teamocil/*(:t:r)' teamocil
# Override .antigen-zshrc
source ~/.antigen-zshrc
######################################################################
# This file was autogenerated by `make`. Do not edit it directly!
######################################################################
# Antigen: A simple plugin manager for zsh
# Authors: Shrikant Sharat Kandula
# and Contributors <https://github.com/zsh-users/antigen/contributors>
# Homepage: http://antigen.sharats.me
# License: MIT License <mitl.sharats.me>
zmodload zsh/parameter
autoload -U is-at-least
# While boot.zsh is part of the ext/cache functionallity it may be disabled
# with ANTIGEN_CACHE flag, and it's always compiled with antigen.zsh
if [[ $ANTIGEN_CACHE != false ]]; then
ANTIGEN_CACHE="${ANTIGEN_CACHE:-${ADOTDIR:-$HOME/.antigen}/init.zsh}"
ANTIGEN_RSRC="${ANTIGEN_RSRC:-${ADOTDIR:-$HOME/.antigen}/.resources}"
# It may not be necessary to check ANTIGEN_AUTO_CONFIG.
if [[ $ANTIGEN_AUTO_CONFIG != false && -f $ANTIGEN_RSRC ]]; then
# Check the list of files for configuration changes (uses -nt comp)
ANTIGEN_CHECK_FILES=$(cat $ANTIGEN_RSRC 2> /dev/null)
ANTIGEN_CHECK_FILES=(${(@f)ANTIGEN_CHECK_FILES})
for config in $ANTIGEN_CHECK_FILES; do
if [[ "$config" -nt "$config.zwc" ]]; then
# Flag configuration file as newer
{ zcompile "$config" } &!
# Kill cache file in order to force full loading (see a few lines below)
[[ -f "$ANTIGEN_CACHE" ]] && rm -f "$ANTIGEN_CACHE"
fi
done
fi
# If there is a cache file do load from it
if [[ -f $ANTIGEN_CACHE && ! $_ANTIGEN_CACHE_LOADED == true ]]; then
# Wrap antigen in order to defer cache source until `antigen-apply`
antigen() {
if [[ $1 == "apply" ]]; then
source "$ANTIGEN_CACHE"
# Handle `antigen-init` command properly
elif [[ $1 == "init" ]]; then
source "$2"
fi
}
# Do not continue loading antigen as cache bundle takes care of it.
return 0
fi
fi
[[ -z "$_ANTIGEN_INSTALL_DIR" ]] && _ANTIGEN_INSTALL_DIR=${0:A:h}
# Each line in this string has the following entries separated by a space
# character.
# <repo-url>, <plugin-location>, <bundle-type>, <has-local-clone>
[[ $_ANTIGEN_CACHE_LOADED != true ]] && typeset -aU _ANTIGEN_BUNDLE_RECORD
# Do not load anything if git is not available.
if (( ! $+commands[git] )); then
echo 'Antigen: Please install git to use Antigen.' >&2
return 1
fi
# Used to defer compinit/compdef
typeset -a __deferred_compdefs
compdef () { __deferred_compdefs=($__deferred_compdefs "$*") }
# A syntax sugar to avoid the `-` when calling antigen commands. With this
# function, you can write `antigen-bundle` as `antigen bundle` and so on.
antigen () {
local cmd="$1"
if [[ -z "$cmd" ]]; then
echo 'Antigen: Please give a command to run.' >&2
return 1
fi
shift
if (( $+functions[antigen-$cmd] )); then
"antigen-$cmd" "$@"
return $?
else
echo "Antigen: Unknown command: $cmd" >&2
return 1
fi
}
# Returns the bundle's git revision
#
# Usage
# -antigen-bundle-rev bundle-name [is_local_clone]
#
# Returns
# Bundle rev-parse output (branch name or short ref name)
-antigen-bundle-rev () {
local bundle=$1
local is_local_clone=$2
local bundle_path=$bundle
# Get bunde path inside $ADOTDIR if bundle was effectively cloned
if [[ "$is_local_clone" == "true" ]]; then
bundle_path=$(-antigen-get-clone-dir $bundle)
fi
local ref
ref=$(git --git-dir="$bundle_path/.git" rev-parse --abbrev-ref '@' 2>/dev/null)
# Avoid 'HEAD' when in detached mode
if [[ $ref == "HEAD" ]]; then
ref=$(git --git-dir="$bundle_path/.git" describe --tags --exact-match 2>/dev/null \
|| git --git-dir="$bundle_path/.git" rev-parse --short '@' 2>/dev/null || "-")
fi
echo $ref
}
# Usage:
# -antigen-bundle-short-name "https://github.com/user/repo.git[|*]" "[branch/name]"
# Returns:
# user/repo@branch/name
-antigen-bundle-short-name () {
local bundle_name="${1%|*}"
local bundle_branch="$2"
local match mbegin mend MATCH MBEGIN MEND
[[ "$bundle_name" =~ '.*/(.*/.*).*$' ]] && bundle_name=$match[1]
bundle_name="${bundle_name%.git*}"
if [[ -n $bundle_branch ]]; then
bundle_name="$bundle_name@$bundle_branch"
fi
echo $bundle_name
}
# Echo the bundle specs as in the record. The first line is not echoed since it
# is a blank line.
-antigen-echo-record () {
echo ${(j:\n:)_ANTIGEN_BUNDLE_RECORD}
}
# Filters _ANTIGEN_BUNDLE_RECORD for $1
#
# Usage
# -antigen-find-bundle example/bundle
#
# Returns
# String if bundle is found
-antigen-find-bundle () {
echo $(-antigen-find-record $1 | cut -d' ' -f1)
}
# Filters _ANTIGEN_BUNDLE_RECORD for $1
#
# Usage
# -antigen-find-record example/bundle
#
# Returns
# String if record is found
-antigen-find-record () {
local bundle=$1
if [[ $# -eq 0 ]]; then
return 1
fi
local record=${bundle/\|/\\\|}
echo "${_ANTIGEN_BUNDLE_RECORD[(r)*$record*]}"
}
# Returns bundle names from _ANTIGEN_BUNDLE_RECORD
#
# Usage
# -antigen-get-bundles [--short|--simple|--long]
#
# Returns
# List of bundles installed
-antigen-get-bundles () {
local mode revision url bundle_name bundle_entry loc no_local_clone
local record bundle make_local_clone
mode=${1:-"--short"}
for record in $_ANTIGEN_BUNDLE_RECORD; do
bundle=(${(@s/ /)record})
url=$bundle[1]
loc=$bundle[2]
make_local_clone=$bundle[4]
bundle_name=$(-antigen-bundle-short-name $url)
case "$mode" in
--short)
# Only check revision for bundle with a requested branch
if [[ $url == *\|* ]]; then
revision=$(-antigen-bundle-rev $url $make_local_clone)
else
revision="master"
fi
if [[ $loc != '/' ]]; then
bundle_name="$bundle_name ~ $loc"
fi
echo "$bundle_name @ $revision"
;;
--simple)
echo "$bundle_name"
;;
--long)
echo "$record"
;;
esac
done
}
# Usage:
# -antigen-get-clone-dir "https://github.com/zsh-users/zsh-syntax-highlighting.git[|feature/branch]"
# Returns:
# $ANTIGEN_BUNDLES/zsh-users/zsh-syntax-highlighting[-feature-branch]
-antigen-get-clone-dir () {
local bundle="$1"
local url="${bundle%|*}"
local branch match mbegin mend MATCH MBEGIN MEND
[[ "$bundle" =~ "\|" ]] && branch="${bundle#*|}"
# Takes a repo url and mangles it, giving the path that this url will be
# cloned to. Doesn't actually clone anything.
local clone_dir="$ANTIGEN_BUNDLES"
url=$(-antigen-bundle-short-name $url)
# Suffix with branch/tag name
[[ -n "$branch" ]] && url="$url-${branch//\//-}"
url=${url//\*/x}
echo "$clone_dir/$url"
}
# Returns bundles flagged as make_local_clone
#
# Usage
# -antigen-cloned-bundles
#
# Returns
# Bundle metadata
-antigen-get-cloned-bundles() {
-antigen-echo-record |
awk '$4 == "true" {print $1}' |
sort -u
}
# Returns a list of themes from a default library (omz)
#
# Usage
# -antigen-get-themes
#
# Returns
# List of themes by name
-antigen-get-themes () {
local library='robbyrussell/oh-my-zsh'
local bundle=$(-antigen-find-bundle $library)
if [[ -n "$bundle" ]]; then
local dir=$(-antigen-get-clone-dir $ANTIGEN_DEFAULT_REPO_URL)
echo $(ls $dir/themes/ | grep '.zsh-theme$' | sed 's/.zsh-theme//')
fi
return 0
}
# This function check ZSH_EVAL_CONTEXT to determine if running in interactive shell.
#
# Usage
# -antigen-interactive-mode
#
# Returns
# Either true or false depending if we are running in interactive mode
-antigen-interactive-mode () {
WARN "-antigen-interactive-mode: $ZSH_EVAL_CONTEXT \$_ANTIGEN_INTERACTIVE = $_ANTIGEN_INTERACTIVE"
if [[ $_ANTIGEN_INTERACTIVE != "" ]]; then
[[ $_ANTIGEN_INTERACTIVE == true ]];
return
fi
[[ "$ZSH_EVAL_CONTEXT" == toplevel* || "$ZSH_EVAL_CONTEXT" == cmdarg* ]];
}
# Parses and retrieves a remote branch given a branch name.
#
# If the branch name contains '*' it will retrieve remote branches
# and try to match against tags and heads, returning the latest matching.
#
# Usage
# -antigen-parse-branch https://github.com/user/repo.git x.y.z
#
# Returns
# Branch name
-antigen-parse-branch () {
local url="$1" branch="$2" branches
local match mbegin mend MATCH MBEGIN MEND
if [[ "$branch" =~ '\*' ]]; then
branches=$(git ls-remote --tags -q "$url" "$branch"|cut -d'/' -f3|sort -n|tail -1)
# There is no --refs flag in git 1.8 and below, this way we
# emulate this flag -- also git 1.8 ref order is undefined.
branch=${${branches#*/*/}%^*} # Why you are like this?
fi
echo $branch
}
-antigen-update-repos () {
local repo bundle url target
local log=/tmp/antigen-v2-migrate.log
echo "It seems you have bundles cloned with Antigen v1.x."
echo "We'll try to convert directory structure to v2."
echo
echo -n "Moving bundles to '\$ADOTDIR/bundles'... "
# Migrate old repos -> bundles
local errors=0
for repo in $ADOTDIR/repos/*; do
bundle=${repo/$ADOTDIR\/repos\//}
bundle=${bundle//-SLASH-/\/}
bundle=${bundle//-COLON-/\:}
bundle=${bundle//-STAR-/\*}
url=${bundle//-PIPE-/\|}
target=$(-antigen-get-clone-dir $url)
mkdir -p "${target:A:h}"
echo " ---> ${repo/$ADOTDIR\/} -> ${target/$ADOTDIR\/}" | tee > $log
mv "$repo" "$target" &> $log
if [[ $? != 0 ]]; then
echo "Failed to migrate '$repo'!."
errors+=1
fi
done
if [[ $errors == 0 ]]; then
echo "Done."
else
echo "An error ocurred!"
fi
echo
if [[ "$(ls -A $ADOTDIR/repos | wc -l | xargs)" == 0 ]]; then
echo "You can safely remove \$ADOTDIR/repos."
else
echo "Some bundles couldn't be migrated. See \$ADOTDIR/repos."
fi
echo
if [[ $errors == 0 ]]; then
echo "Bundles migrated successfuly."
rm $log
else
echo "Some errors occured. Review migration log in '$log'."
fi
antigen-reset
}
# Ensure that a clone exists for the given repo url and branch. If the first
# argument is `update` and if a clone already exists for the given repo
# and branch, it is pull-ed, i.e., updated.
#
# This function expects three arguments in order:
# - 'url=<url>'
# - 'update=true|false'
# - 'verbose=true|false'
#
# Returns true|false Whether cloning/pulling was succesful
-antigen-ensure-repo () {
# Argument defaults. Previously using ${1:?"missing url argument"} format
# but it seems to mess up with cram
if (( $# < 1 )); then
echo "Antigen: Missing url argument."
return 1
fi
# The url. No sane default for this, so just empty.
local url=$1
# Check if we have to update.
local update=${2:-false}
# Verbose output.
local verbose=${3:-false}
shift $#
# Get the clone's directory as per the given repo url and branch.
local clone_dir=$(-antigen-get-clone-dir $url)
if [[ -d "$clone_dir" && $update == false ]]; then
return true
fi
# A temporary function wrapping the `git` command with repeated arguments.
--plugin-git () {
(\cd -q "$clone_dir" && eval ${ANTIGEN_CLONE_ENV} git --git-dir="$clone_dir/.git" --no-pager "$@" &>>! $ANTIGEN_LOG)
}
local success=false
# If its a specific branch that we want, checkout that branch.
local branch="master" # TODO FIX THIS
if [[ $url == *\|* ]]; then
branch="$(-antigen-parse-branch ${url%|*} ${url#*|})"
fi
if [[ ! -d $clone_dir ]]; then
eval ${ANTIGEN_CLONE_ENV} git clone ${=ANTIGEN_CLONE_OPTS} --branch "$branch" -- "${url%|*}" "$clone_dir" &>> $ANTIGEN_LOG
success=$?
elif $update; then
# Save current revision.
local old_rev="$(--plugin-git rev-parse HEAD)"
# Pull changes if update requested.
--plugin-git checkout "$branch"
--plugin-git pull origin "$branch"
success=$?
# Update submodules.
--plugin-git submodule update ${=ANTIGEN_SUBMODULE_OPTS}
# Get the new revision.
local new_rev="$(--plugin-git rev-parse HEAD)"
fi
if [[ -n $old_rev && $old_rev != $new_rev ]]; then
echo Updated from $old_rev[0,7] to $new_rev[0,7].
if $verbose; then
--plugin-git log --oneline --reverse --no-merges --stat '@{1}..'
fi
fi
# Remove the temporary git wrapper function.
unfunction -- --plugin-git
return $success
}
# Helper function: Same as `$1=$2`, but will only happen if the name
# specified by `$1` is not already set.
-antigen-set-default () {
local arg_name="$1"
local arg_value="$2"
eval "test -z \"\$$arg_name\" && typeset -g $arg_name='$arg_value'"
}
-antigen-env-setup () {
typeset -gU fpath path
# Pre-startup initializations.
-antigen-set-default ANTIGEN_OMZ_REPO_URL \
https://github.com/robbyrussell/oh-my-zsh.git
-antigen-set-default ANTIGEN_PREZTO_REPO_URL \
https://github.com/sorin-ionescu/prezto.git
-antigen-set-default ANTIGEN_DEFAULT_REPO_URL $ANTIGEN_OMZ_REPO_URL
# Default Antigen directory.
-antigen-set-default ADOTDIR $HOME/.antigen
[[ ! -d $ADOTDIR ]] && mkdir -p $ADOTDIR
# Defaults bundles directory.
-antigen-set-default ANTIGEN_BUNDLES $ADOTDIR/bundles
# If there is no bundles directory, create it.
if [[ ! -d $ANTIGEN_BUNDLES ]]; then
mkdir -p $ANTIGEN_BUNDLES
# Check for v1 repos directory, transform it to v2 format.
[[ -d $ADOTDIR/repos ]] && -antigen-update-repos
fi
-antigen-set-default ANTIGEN_COMPDUMP "${ADOTDIR:-$HOME}/.zcompdump"
-antigen-set-default ANTIGEN_LOG /dev/null
# CLONE_OPTS uses ${=CLONE_OPTS} expansion so don't use spaces
# for arguments that can be passed as `--key=value`.
-antigen-set-default ANTIGEN_CLONE_ENV "GIT_TERMINAL_PROMPT=0"
-antigen-set-default ANTIGEN_CLONE_OPTS "--single-branch --recursive --depth=1"
-antigen-set-default ANTIGEN_SUBMODULE_OPTS "--recursive --depth=1"
# Complain when a bundle is already installed.
-antigen-set-default _ANTIGEN_WARN_DUPLICATES true
# Compatibility with oh-my-zsh themes.
-antigen-set-default _ANTIGEN_THEME_COMPAT true
# Add default built-in extensions to load at start up
-antigen-set-default _ANTIGEN_BUILTIN_EXTENSIONS 'lock parallel defer cache'
# Setup antigen's own completion.
if -antigen-interactive-mode; then
TRACE "Gonna create compdump file @ env-setup" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
compdef _antigen antigen
else
(( $+functions[antigen-ext-init] )) && antigen-ext-init
fi
}
# Load a given bundle by sourcing it.
#
# The function also modifies fpath to add the bundle path.
#
# Usage
# -antigen-load "bundle-url" ["location"] ["make_local_clone"] ["btype"]
#
# Returns
# Integer. 0 if success 1 if an error ocurred.
-antigen-load () {
local bundle list
typeset -A bundle; bundle=($@)
typeset -Ua list; list=()
local location="${bundle[dir]}/${bundle[loc]}"
# Prioritize location when given.
if [[ -f "${location}" ]]; then
list=(${location})
else
# Directory locations must be suffixed with slash
location="$location/"
# Prioritize theme with antigen-theme
if [[ ${bundle[btype]} == "theme" ]]; then
list=(${location}*.zsh-theme(N[1]))
fi
# Common frameworks
if [[ $#list == 0 ]]; then
# dot-plugin, init and functions support (omz, prezto)
# Support prezto function loading. See https://github.com/zsh-users/antigen/pull/428
list=(${location}*.plugin.zsh(N[1]) ${location}init.zsh(N[1]) ${location}/functions(N[1]))
fi
# Default to zsh and sh
if [[ $#list == 0 ]]; then
list=(${location}*.zsh(N) ${location}*.sh(N))
fi
fi
-antigen-load-env ${(kv)bundle}
# If there is any sourceable try to load it
if ! -antigen-load-source "${list[@]}" && [[ ! -d ${location} ]]; then
return 1
fi
return 0
}
-antigen-load-env () {
typeset -A bundle; bundle=($@)
local location=${bundle[dir]}/${bundle[loc]}
# Load to path if there is no sourceable
if [[ -d ${location} ]]; then
PATH="$PATH:${location:A}"
fpath+=("${location:A}")
return
fi
PATH="$PATH:${location:A:h}"
fpath+=("${location:A:h}")
}
-antigen-load-source () {
typeset -a list
list=($@)
local src match mbegin mend MATCH MBEGIN MEND
# Return error when we're given an empty list
if [[ $#list == 0 ]]; then
return 1
fi
# Using a for rather than `source $list` as we need to check for zsh-themes
# In order to create antigen-compat file. This is only needed for interactive-mode
# theme switching, for static loading (cache) there is no need.
for src in $list; do
if [[ $_ANTIGEN_THEME_COMPAT == true && -f "$src" && "$src" == *.zsh-theme* ]]; then
local compat="${src:A}.antigen-compat"
echo "# Generated by Antigen. Do not edit!" >! "$compat"
cat $src | sed -Ee '/\{$/,/^\}/!{
s/^local //
}' >>! "$compat"
src="$compat"
fi
if ! source "$src" 2>/dev/null; then
return 1
fi
done
}
# Usage:
# -antigen-parse-args output_assoc_arr <args...>
-antigen-parse-args () {
local argkey key value index=0 args
local match mbegin mend MATCH MBEGIN MEND
local var=$1
shift
# Bundle spec arguments' default values.
#setopt XTRACE VERBOSE
builtin typeset -A args
args[url]="$ANTIGEN_DEFAULT_REPO_URL"
#unsetopt XTRACE VERBOSE
args[loc]=/
args[make_local_clone]=true
args[btype]=plugin
#args[branch]= # commented out as it may cause assoc array kv mismatch
while [[ $# -gt 0 ]]; do
argkey="${1%\=*}"
key="${argkey//--/}"
value="${1#*=}"
case "$argkey" in
--url|--loc|--branch|--btype)
if [[ "$value" == "$argkey" ]]; then
printf "Required argument for '%s' not provided.\n" $key >&2
else
args[$key]="$value"
fi
;;
--no-local-clone)
args[make_local_clone]=false
;;
--*)
printf "Unknown argument '%s'.\n" $key >&2
;;
*)
value=$key
case $index in
0)
key=url
local domain=""
local url_path=$value
# Full url with protocol or ssh github url (github.com:org/repo)
if [[ "$value" =~ "://" || "$value" =~ ":" ]]; then
if [[ "$value" =~ [@.][^/:]+[:]?[0-9]*[:/]?(.*)@?$ ]]; then
url_path=$match[1]
domain=${value/$url_path/}
fi
fi
if [[ "$url_path" =~ '@' ]]; then
args[branch]="${url_path#*@}"
value="$domain${url_path%@*}"
else
value="$domain$url_path"
fi
;;
1) key=loc ;;
esac
let index+=1
args[$key]="$value"
;;
esac
shift
done
# Check if url is just the plugin name. Super short syntax.
if [[ "${args[url]}" != */* ]]; then
case "$ANTIGEN_DEFAULT_REPO_URL" in
"$ANTIGEN_OMZ_REPO_URL")
args[loc]="plugins/${args[url]}"
;;
"$ANTIGEN_PREZTO_REPO_URL")
args[loc]="modules/${args[url]}"
;;
*)
args[loc]="${args[url]}"
;;
esac
args[url]="$ANTIGEN_DEFAULT_REPO_URL"
fi
# Resolve the url.
# Expand short github url syntax: `username/reponame`.
local url="${args[url]}"
if [[ $url != git://* &&
$url != https://* &&
$url != http://* &&
$url != ssh://* &&
$url != /* &&
$url != *github.com:*/*
]]; then
url="https://github.com/${url%.git}.git"
fi
args[url]="$url"
# Ignore local clone if url given is not a git directory
if [[ ${args[url]} == /* && ! -d ${args[url]}/.git ]]; then
args[make_local_clone]=false
fi
# Add the branch information to the url if we need to create a local clone.
# Format url in bundle-metadata format: url[|branch]
if [[ ! -z "${args[branch]}" && ${args[make_local_clone]} == true ]]; then
args[url]="${args[url]}|${args[branch]}"
fi
# Add the theme extension to `loc`, if this is a theme, but only
# if it's especified, ie, --loc=theme-name, in case when it's not
# specified antige-load-list will look for *.zsh-theme files
if [[ ${args[btype]} == "theme" &&
${args[loc]} != "/" && ${args[loc]} != *.zsh-theme ]]; then
args[loc]="${args[loc]}.zsh-theme"
fi
local name="${args[url]%|*}"
local branch="${args[branch]}"
# Extract bundle name.
if [[ "$name" =~ '.*/(.*/.*).*$' ]]; then
name="${match[1]}"
fi
name="${name%.git*}"
# Format bundle name with optional branch.
if [[ -n "${branch}" ]]; then
args[name]="${name}@${branch}"
else
args[name]="${name}"
fi
# Format bundle path.
if [[ ${args[make_local_clone]} == true ]]; then
local bpath="$name"
# Suffix with branch/tag name
if [[ -n "$branch" ]]; then
# bpath is in the form of repo/name@version => repo/name-version
# Replace / with - in bundle branch.
local bbranch=${branch//\//-}
# If branch/tag is semver-like do replace * by x.
bbranch=${bbranch//\*/x}
bpath="${name}-${bbranch}"
fi
bpath="$ANTIGEN_BUNDLES/$bpath"
args[dir]="${(qq)bpath}"
else
# if it's local then path is just the "url" argument, loc remains the same
args[dir]=${args[url]}
fi
# Escape url and branch (may contain semver-like and pipe characters)
args[url]="${(qq)args[url]}"
if [[ -n "${args[branch]}" ]]; then
args[branch]="${(qq)args[branch]}"
fi
# Escape bundle name (may contain semver-like characters)
args[name]="${(qq)args[name]}"
eval "${var}=(${(kv)args})"
return 0
}
# Updates revert-info data with git hash.
#
# This does process only cloned bundles.
#
# Usage
# -antigen-revert-info
#
# Returns
# Nothing. Generates/updates $ADOTDIR/revert-info.
-antigen-revert-info() {
local url
# Update your bundles, i.e., `git pull` in all the plugin repos.
date >! $ADOTDIR/revert-info
-antigen-get-cloned-bundles | while read url; do
local clone_dir="$(-antigen-get-clone-dir "$url")"
if [[ -d "$clone_dir" ]]; then
(echo -n "$clone_dir:"
\cd -q "$clone_dir"
git rev-parse HEAD) >> $ADOTDIR/revert-info
fi
done
}
-antigen-use-oh-my-zsh () {
typeset -g ZSH ZSH_CACHE_DIR
ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_OMZ_REPO_URL
if [[ -z "$ZSH" ]]; then
ZSH="$(-antigen-get-clone-dir "$ANTIGEN_DEFAULT_REPO_URL")"
fi
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache/"
fi
antigen-bundle --loc=lib
}
-antigen-use-prezto () {
ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_PREZTO_REPO_URL
antigen-bundle "$ANTIGEN_PREZTO_REPO_URL"
}
# Initialize completion
antigen-apply () {
LOG "Called antigen-apply"
# Load the compinit module. This will readefine the `compdef` function to
# the one that actually initializes completions.
TRACE "Gonna create compdump file @ apply" COMPDUMP
autoload -Uz compinit
compinit -d "$ANTIGEN_COMPDUMP"
# Apply all `compinit`s that have been deferred.
local cdef
for cdef in "${__deferred_compdefs[@]}"; do
compdef "$cdef"
done
{ zcompile "$ANTIGEN_COMPDUMP" } &!
unset __deferred_compdefs
}
# Syntaxes
# antigen-bundle <url> [<loc>=/]
# Keyword only arguments:
# branch - The branch of the repo to use for this bundle.
antigen-bundle () {
TRACE "Called antigen-bundle with $@" BUNDLE
if [[ -z "$1" ]]; then
printf "Antigen: Must provide a bundle url or name.\n" >&2
return 1
fi
builtin typeset -A bundle; -antigen-parse-args 'bundle' ${=@}
if [[ -z ${bundle[btype]} ]]; then
bundle[btype]=bundle
fi
local record="${bundle[url]} ${bundle[loc]} ${bundle[btype]} ${bundle[make_local_clone]}"
if [[ $_ANTIGEN_WARN_DUPLICATES == true && ! ${_ANTIGEN_BUNDLE_RECORD[(I)$record]} == 0 ]]; then
printf "Seems %s is already installed!\n" ${bundle[name]}
return 1
fi
# Clone bundle if we haven't done do already.
if [[ ! -d "${bundle[dir]}" ]]; then
if ! -antigen-bundle-install ${(kv)bundle}; then
return 1
fi
fi
# Load the plugin.
if ! -antigen-load ${(kv)bundle}; then
TRACE "-antigen-load failed to load ${bundle[name]}" BUNDLE
printf "Antigen: Failed to load %s.\n" ${bundle[btype]} >&2
return 1
fi
# Only add it to the record if it could be installed and loaded.
_ANTIGEN_BUNDLE_RECORD+=("$record")
}
#
# Usage:
# -antigen-bundle-install <record>
# Returns:
# 1 if it fails to install bundle
-antigen-bundle-install () {
typeset -A bundle; bundle=($@)
# Ensure a clone exists for this repo, if needed.
# Get the clone's directory as per the given repo url and branch.
local bpath="${bundle[dir]}"
# Clone if it doesn't already exist.
local start=$(date +'%s')
printf "Installing %s... " "${bundle[name]}"
if ! -antigen-ensure-repo "${bundle[url]}"; then
# Return immediately if there is an error cloning
TRACE "-antigen-bundle-instal failed to clone ${bundle[url]}" BUNDLE
printf "Error! Activate logging and try again.\n" >&2
return 1
fi
local took=$(( $(date +'%s') - $start ))
printf "Done. Took %ds.\n" $took
}
antigen-bundles () {
# Bulk add many bundles at one go. Empty lines and lines starting with a `#`
# are ignored. Everything else is given to `antigen-bundle` as is, no
# quoting rules applied.
local line
setopt localoptions no_extended_glob # See https://github.com/zsh-users/antigen/issues/456
grep '^[[:space:]]*[^[:space:]#]' | while read line; do
antigen-bundle ${=line%#*}
done
}
# Cleanup unused repositories.
antigen-cleanup () {
local force=false
if [[ $1 == --force ]]; then
force=true
fi
if [[ ! -d "$ANTIGEN_BUNDLES" || -z "$(\ls -A "$ANTIGEN_BUNDLES")" ]]; then
echo "You don't have any bundles."
return 0
fi
# Find directores in ANTIGEN_BUNDLES, that are not in the bundles record.
typeset -a unused_clones clones
local url record clone
for record in $(-antigen-get-cloned-bundles); do
url=${record% /*}
clones+=("$(-antigen-get-clone-dir $url)")
done
for clone in $ANTIGEN_BUNDLES/*/*(/); do
if [[ $clones[(I)$clone] == 0 ]]; then
unused_clones+=($clone)
fi
done
if [[ -z $unused_clones ]]; then
echo "You don't have any unidentified bundles."
return 0
fi
echo 'You have clones for the following repos, but are not used.'
echo "\n${(j:\n:)unused_clones}"
if $force || (echo -n '\nDelete them all? [y/N] '; read -q); then
echo
echo
for clone in $unused_clones; do
echo -n "Deleting clone \"$clone\"..."
\rm -rf "$clone"
echo ' done.'
done
else
echo
echo "Nothing deleted."
fi
}
antigen-help () {
antigen-version
cat <<EOF
Antigen is a plugin management system for zsh. It makes it easy to grab awesome
shell scripts and utilities, put up on Github.
Usage: antigen <command> [args]
Commands:
apply Must be called in the zshrc after all calls to 'antigen bundle'.
bundle Install and load a plugin.
cache-gen Generate Antigen's cache with currently loaded bundles.
cleanup Remove clones of repos not used by any loaded plugins.
init Use caching to quickly load bundles.
list List currently loaded plugins.
purge Remove a bundle from the filesystem.
reset Clean the generated cache.
restore Restore plugin state from a snapshot file.
revert Revert plugins to their state prior to the last time 'antigen
update' was run.
selfupdate Update antigen.
snapshot Create a snapshot of all active plugin repos and save it to a
snapshot file.
update Update plugins.
use Load a supported zsh pre-packaged framework.
For further details and complete documentation, visit the project's page at
'http://antigen.sharats.me'.
EOF
}
# Antigen command to load antigen configuration
#
# This method is slighlty more performing than using various antigen-* methods.
#
# Usage
# Referencing an antigen configuration file:
#
# antigen-init "/path/to/antigenrc"
#
# or using HEREDOCS:
#
# antigen-init <<EOBUNDLES
# antigen use oh-my-zsh
#
# antigen bundle zsh/bundle
# antigen bundle zsh/example
#
# antigen theme zsh/theme
#
# antigen apply
# EOBUNDLES
#
# Returns
# Nothing
antigen-init () {
local src="$1" line
# If we're given an argument it should be a path to a file
if [[ -n "$src" ]]; then
if [[ -f "$src" ]]; then
source "$src"
return
else
printf "Antigen: invalid argument provided.\n" >&2
return 1
fi
fi
# Otherwise we expect it to be a heredoc
grep '^[[:space:]]*[^[:space:]#]' | while read -r line; do
eval $line
done
}
# List instaled bundles either in long (record), short or simple format.
#
# Usage
# antigen-list [--short|--long|--simple]
#
# Returns
# List of bundles
antigen-list () {
local format=$1
# List all currently installed bundles.
if [[ -z $_ANTIGEN_BUNDLE_RECORD ]]; then
echo "You don't have any bundles." >&2
return 1
fi
-antigen-get-bundles $format
}
# Remove a bundle from filesystem
#
# Usage
# antigen-purge example/bundle [--force]
#
# Returns
# Nothing. Removes bundle from filesystem.
antigen-purge () {
local bundle=$1
local force=$2
if [[ $# -eq 0 ]]; then
echo "Antigen: Missing argument." >&2
return 1
fi
if -antigen-purge-bundle $bundle $force; then
antigen-reset
else
return $?
fi
return 0
}
# Remove a bundle from filesystem
#
# Usage
# antigen-purge example/bundle [--force]
#
# Returns
# Nothing. Removes bundle from filesystem.
-antigen-purge-bundle () {
local bundle=$1
local force=$2
local clone_dir=""
local record=""
local url=""
local make_local_clone=""
if [[ $# -eq 0 ]]; then
echo "Antigen: Missing argument." >&2
return 1
fi
# local keyword doesn't work on zsh <= 5.0.0
record=$(-antigen-find-record $bundle)
if [[ ! -n "$record" ]]; then
echo "Bundle not found in record. Try 'antigen bundle $bundle' first." >&2
return 1
fi
url="$(echo "$record" | cut -d' ' -f1)"
make_local_clone=$(echo "$record" | cut -d' ' -f4)
if [[ $make_local_clone == "false" ]]; then
echo "Bundle has no local clone. Will not be removed." >&2
return 1
fi
clone_dir=$(-antigen-get-clone-dir "$url")
if [[ $force == "--force" ]] || read -q "?Remove '$clone_dir'? (y/n) "; then
# Need empty line after read -q
[[ ! -n $force ]] && echo "" || echo "Removing '$clone_dir'.";
rm -rf "$clone_dir"
return $?
fi
return 1
}
# Removes cache payload and metadata if available
#
# Usage
# antigen-reset
#
# Returns
# Nothing
antigen-reset () {
[[ -f "$ANTIGEN_CACHE" ]] && rm -f "$ANTIGEN_CACHE" "$ANTIGEN_CACHE.zwc" 1> /dev/null
[[ -f "$ANTIGEN_RSRC" ]] && rm -f "$ANTIGEN_RSRC" 1> /dev/null
[[ -f "$ANTIGEN_COMPDUMP" ]] && rm -f "$ANTIGEN_COMPDUMP" "$ANTIGEN_COMPDUMP.zwc" 1> /dev/null
[[ -f "$ANTIGEN_LOCK" ]] && rm -f "$ANTIGEN_LOCK" 1> /dev/null
echo 'Done. Please open a new shell to see the changes.'
}
antigen-restore () {
local line
if [[ $# == 0 ]]; then
echo 'Please provide a snapshot file to restore from.' >&2
return 1
fi
local snapshot_file="$1"
# TODO: Before doing anything with the snapshot file, verify its checksum.
# If it fails, notify this to the user and confirm if restore should
# proceed.
echo -n "Restoring from $snapshot_file..."
sed -n '1!p' "$snapshot_file" |
while read line; do
local version_hash="${line%% *}"
local url="${line##* }"
local clone_dir="$(-antigen-get-clone-dir "$url")"
if [[ ! -d $clone_dir ]]; then
git clone "$url" "$clone_dir" &> /dev/null
fi
(\cd -q "$clone_dir" && git checkout $version_hash) &> /dev/null
done
echo ' done.'
echo 'Please open a new shell to get the restored changes.'
}
# Reads $ADORDIR/revert-info and restores bundles' revision
antigen-revert () {
local line
if [[ -f $ADOTDIR/revert-info ]]; then
cat $ADOTDIR/revert-info | sed -n '1!p' | while read line; do
local dir="$(echo "$line" | cut -d: -f1)"
git --git-dir="$dir/.git" --work-tree="$dir" \
checkout "$(echo "$line" | cut -d: -f2)" 2> /dev/null
done
echo "Reverted to state before running -update on $(
cat $ADOTDIR/revert-info | sed -n '1p')."
else
echo 'No revert information available. Cannot revert.' >&2
return 1
fi
}
# Update (with `git pull`) antigen itself.
# TODO: Once update is finished, show a summary of the new commits, as a kind of
# "what's new" message.
antigen-selfupdate () {
(\cd -q $_ANTIGEN_INSTALL_DIR
if [[ ! ( -d .git || -f .git ) ]]; then
echo "Your copy of antigen doesn't appear to be a git clone. " \
"The 'selfupdate' command cannot work in this case."
return 1
fi
local head="$(git rev-parse --abbrev-ref HEAD)"
if [[ $head == "HEAD" ]]; then
# If current head is detached HEAD, checkout to master branch.
git checkout master
fi
git pull
# TODO Should be transparently hooked by zcache
antigen-reset &>> /dev/null
)
}
antigen-snapshot () {
local snapshot_file="${1:-antigen-shapshot}"
local urls url dir version_hash snapshot_content
local -a bundles
# The snapshot content lines are pairs of repo-url and git version hash, in
# the form:
# <version-hash> <repo-url>
urls=$(-antigen-echo-record | awk '$4 == "true" {print $1}' | sort -u)
for url in ${(f)urls}; do
dir="$(-antigen-get-clone-dir "$url")"
version_hash="$(\cd -q "$dir" && git rev-parse HEAD)"
bundles+=("$version_hash $url");
done
snapshot_content=${(j:\n:)bundles}
{
# The first line in the snapshot file is for metadata, in the form:
# key='value'; key='value'; key='value';
# Where `key`s are valid shell variable names.
# Snapshot version. Has no relation to antigen version. If the snapshot
# file format changes, this number can be incremented.
echo -n "version='1';"
# Snapshot creation date+time.
echo -n " created_on='$(date)';"
# Add a checksum with the md5 checksum of all the snapshot lines.
chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 }
local checksum="$(echo "$snapshot_content" | chksum)"
unset -f chksum;
echo -n " checksum='${checksum%% *}';"
# A newline after the metadata and then the snapshot lines.
echo "\n$snapshot_content"
} > "$snapshot_file"
}
# Loads a given theme.
#
# Shares the same syntax as antigen-bundle command.
#
# Usage
# antigen-theme zsh/theme[.zsh-theme]
#
# Returns
# 0 if everything was succesfully
antigen-theme () {
local name=$1 result=0 record
local match mbegin mend MATCH MBEGIN MEND
if [[ -z "$1" ]]; then
printf "Antigen: Must provide a theme url or name.\n" >&2
return 1
fi
-antigen-theme-reset-hooks
record=$(-antigen-find-record "theme")
if [[ "$1" != */* && "$1" != --* ]]; then
# The first argument is just a name of the plugin, to be picked up from
# the default repo.
antigen-bundle --loc=themes/$name --btype=theme
else
antigen-bundle "$@" --btype=theme
fi
result=$?
# Remove a theme from the record if the following conditions apply:
# - there was no error in bundling the given theme
# - there is a theme registered
# - registered theme is not the same as the current one
if [[ $result == 0 && -n $record ]]; then
# http://zsh-workers.zsh.narkive.com/QwfCWpW8/what-s-wrong-with-this-expression
if [[ "$record" =~ "$@" ]]; then
return $result
else
_ANTIGEN_BUNDLE_RECORD[$_ANTIGEN_BUNDLE_RECORD[(I)$record]]=()
fi
fi
return $result
}
-antigen-theme-reset-hooks () {
# This is only needed on interactive mode
autoload -U add-zsh-hook is-at-least
local hook
# Clear out prompts
PROMPT=""
if [[ -n $RPROMPT ]]; then
RPROMPT=""
fi
for hook in chpwd precmd preexec periodic; do
add-zsh-hook -D "${hook}" "prompt_*"
# common in omz themes
add-zsh-hook -D "${hook}" "*_${hook}"
add-zsh-hook -d "${hook}" "vcs_info"
done
}
# Updates the bundles or a single bundle.
#
# Usage
# antigen-update [example/bundle]
#
# Returns
# Nothing. Performs a `git pull`.
antigen-update () {
local bundle=$1 url
# Clear log
:> $ANTIGEN_LOG
# Update revert-info data
-antigen-revert-info
# If no argument is given we update all bundles
if [[ $# -eq 0 ]]; then
# Here we're ignoring all non cloned bundles (ie, --no-local-clone)
-antigen-get-cloned-bundles | while read url; do
-antigen-update-bundle $url
done
# TODO next minor version
# antigen-reset
else
if -antigen-update-bundle $bundle; then
# TODO next minor version
# antigen-reset
else
return $?
fi
fi
}
# Updates a bundle performing a `git pull`.
#
# Usage
# -antigen-update-bundle example/bundle
#
# Returns
# Nothing. Performs a `git pull`.
-antigen-update-bundle () {
local bundle="$1"
local record=""
local url=""
local make_local_clone=""
local start=$(date +'%s')
if [[ $# -eq 0 ]]; then
printf "Antigen: Missing argument.\n" >&2
return 1
fi
record=$(-antigen-find-record $bundle)
if [[ ! -n "$record" ]]; then
printf "Bundle not found in record. Try 'antigen bundle %s' first.\n" $bundle >&2
return 1
fi
url="$(echo "$record" | cut -d' ' -f1)"
make_local_clone=$(echo "$record" | cut -d' ' -f4)
local branch="master"
if [[ $url == *\|* ]]; then
branch="$(-antigen-parse-branch ${url%|*} ${url#*|})"
fi
printf "Updating %s... " $(-antigen-bundle-short-name "$url" "$branch")
if [[ $make_local_clone == "false" ]]; then
printf "Bundle has no local clone. Will not be updated.\n" >&2
return 1
fi
# update=true verbose=false
if ! -antigen-ensure-repo "$url" true false; then
printf "Error! Activate logging and try again.\n" >&2
return 1
fi
local took=$(( $(date +'%s') - $start ))
printf "Done. Took %ds.\n" $took
}
antigen-use () {
if [[ $1 == oh-my-zsh ]]; then
-antigen-use-oh-my-zsh
elif [[ $1 == prezto ]]; then
-antigen-use-prezto
elif [[ $1 != "" ]]; then
ANTIGEN_DEFAULT_REPO_URL=$1
antigen-bundle $@
else
echo 'Usage: antigen-use <library-name|url>' >&2
echo 'Where <library-name> is any one of the following:' >&2
echo ' * oh-my-zsh' >&2
echo ' * prezto' >&2
echo '<url> is the full url.' >&2
return 1
fi
}
antigen-version () {
local version="v2.2.2"
local extensions revision=""
if [[ -d $_ANTIGEN_INSTALL_DIR/.git ]]; then
revision=" ($(git --git-dir=$_ANTIGEN_INSTALL_DIR/.git rev-parse --short '@'))"
fi
printf "Antigen %s%s\n" $version $revision
if (( $+functions[antigen-ext] )); then
typeset -a extensions; extensions=($(antigen-ext-list))
if [[ $#extensions -gt 0 ]]; then
printf "Extensions loaded: %s\n" ${(j:, :)extensions}
fi
fi
}
typeset -Ag _ANTIGEN_HOOKS; _ANTIGEN_HOOKS=()
typeset -Ag _ANTIGEN_HOOKS_META; _ANTIGEN_HOOKS_META=()
typeset -g _ANTIGEN_HOOK_PREFIX="-antigen-hook-"
typeset -g _ANTIGEN_EXTENSIONS; _ANTIGEN_EXTENSIONS=()
# -antigen-add-hook antigen-apply antigen-apply-hook replace
# - Replaces hooked function with hook, do not call hooked function
# - Return -1 to stop calling further hooks
# -antigen-add-hook antigen-apply antigen-apply-hook pre (pre-call)
# - By default it will call hooked function
# -antigen-add-hook antigen-pply antigen-apply-hook post (post-call)
# - Calls antigen-apply and then calls hook function
# Usage:
# -antigen-add-hook antigen-apply antigen-apply-hook ["replace"|"pre"|"post"] ["once"|"repeat"]
antigen-add-hook () {
local target="$1" hook="$2" type="$3" mode="${4:-repeat}"
if (( ! $+functions[$target] )); then
printf "Antigen: Function %s doesn't exist.\n" $target
return 1
fi
if (( ! $+functions[$hook] )); then
printf "Antigen: Function %s doesn't exist.\n" $hook
return 1
fi
if [[ "${_ANTIGEN_HOOKS[$target]}" == "" ]]; then
_ANTIGEN_HOOKS[$target]="${hook}"
else
_ANTIGEN_HOOKS[$target]="${_ANTIGEN_HOOKS[$target]}:${hook}"
fi
_ANTIGEN_HOOKS_META[$hook]="target $target type $type mode $mode called 0"
# Do shadow for this function if there is none already
local hook_function="${_ANTIGEN_HOOK_PREFIX}$target"
if (( ! $+functions[$hook_function] )); then
# Preserve hooked function
eval "function ${_ANTIGEN_HOOK_PREFIX}$(functions -- $target)"
# Create hook, call hook-handler to further process hook functions
eval "function $target () {
noglob -antigen-hook-handler $target \$@
return \$?
}"
fi
return 0
}
# Private function to handle multiple hooks in a central point.
-antigen-hook-handler () {
local target="$1" args hook called
local hooks meta
shift
typeset -a args; args=(${@})
typeset -a pre_hooks replace_hooks post_hooks;
typeset -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]})
typeset -A meta;
for hook in $hooks; do
meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]})
if [[ ${meta[mode]} == "once" && ${meta[called]} == 1 ]]; then
WARN "Ignoring hook due to mode ${meta[mode]}: $hook"
continue
fi
let called=${meta[called]}+1
meta[called]=$called
_ANTIGEN_HOOKS_META[$hook]="${(kv)meta}"
WARN "Updated meta: "${(kv)meta}
case "${meta[type]}" in
"pre")
pre_hooks+=($hook)
;;
"replace")
replace_hooks+=($hook)
;;
"post")
post_hooks+=($hook)
;;
esac
done
WARN "Processing hooks: ${hooks}"
for hook in $pre_hooks; do
WARN "Pre hook:" $hook $args
noglob $hook $args
[[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret
done
# A replace hook will return inmediately
local replace_hook=0 ret=0
for hook in $replace_hooks; do
replace_hook=1
# Should not be needed if `antigen-remove-hook` removed unneeded hooks.
if (( $+functions[$hook] )); then
WARN "Replace hook:" $hook $args
noglob $hook $args
[[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret
fi
done
if [[ $replace_hook == 0 ]]; then
WARN "${_ANTIGEN_HOOK_PREFIX}$target $args"
noglob ${_ANTIGEN_HOOK_PREFIX}$target $args
ret=$?
else
WARN "Replaced hooked function."
fi
for hook in $post_hooks; do
WARN "Post hook:" $hook $args
noglob $hook $args
[[ $? == -1 ]] && WARN "$hook shortcircuited" && return $ret
done
LOG "Return from hook ${target} with ${ret}"
return $ret
}
# Usage:
# -antigen-remove-hook antigen-apply-hook
antigen-remove-hook () {
local hook="$1"
typeset -A meta; meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]})
local target="${meta[target]}"
local -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]})
# Remove registered hook
if [[ $#hooks > 0 ]]; then
hooks[$hooks[(I)$hook]]=()
fi
_ANTIGEN_HOOKS[${target}]="${(j|:|)hooks}"
if [[ $#hooks == 0 ]]; then
# Destroy base hook
eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)"
if (( $+functions[${_ANTIGEN_HOOK_PREFIX}$target] )); then
unfunction -- "${_ANTIGEN_HOOK_PREFIX}$target"
fi
fi
unfunction -- $hook 2> /dev/null
}
# Remove all defined hooks.
-antigen-reset-hooks () {
local target
for target in ${(k)_ANTIGEN_HOOKS}; do
# Release all hooked functions
eval "function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)"
unfunction -- "${_ANTIGEN_HOOK_PREFIX}$target" 2> /dev/null
done
_ANTIGEN_HOOKS=()
_ANTIGEN_HOOKS_META=()
_ANTIGEN_EXTENSIONS=()
}
# Initializes an extension
# Usage:
# antigen-ext ext-name
antigen-ext () {
local ext=$1
local func="-antigen-$ext-init"
if (( $+functions[$func] && $_ANTIGEN_EXTENSIONS[(I)$ext] == 0 )); then
eval $func
local ret=$?
WARN "$func return code was $ret"
if (( $ret == 0 )); then
LOG "LOADED EXTENSION $ext" EXT
-antigen-$ext-execute && _ANTIGEN_EXTENSIONS+=($ext)
else
WARN "IGNORING EXTENSION $func" EXT
return 1
fi
else
printf "Antigen: No extension defined or already loaded: %s\n" $func >&2
return 1
fi
}
# List installed extensions
# Usage:
# antigen ext-list
antigen-ext-list () {
echo $_ANTIGEN_EXTENSIONS
}
# Initializes built-in extensions
# Usage:
# antigen-ext-init
antigen-ext-init () {
# Initialize extensions. unless in interactive mode.
local ext
for ext in ${(s/ /)_ANTIGEN_BUILTIN_EXTENSIONS}; do
# Check if extension is loaded before intializing it
(( $+functions[-antigen-$ext-init] )) && antigen-ext $ext
done
}
# Initialize defer lib
-antigen-defer-init () {
typeset -ga _DEFERRED_BUNDLE; _DEFERRED_BUNDLE=()
if -antigen-interactive-mode; then
return 1
fi
}
-antigen-defer-execute () {
# Hooks antigen-bundle in order to defer its execution.
antigen-bundle-defer () {
_DEFERRED_BUNDLE+=("${(j: :)${@}}")
return -1 # Stop right there
}
antigen-add-hook antigen-bundle antigen-bundle-defer replace
# Hooks antigen-apply in order to release hooked functions
antigen-apply-defer () {
WARN "Defer pre-apply" DEFER PRE-APPLY
antigen-remove-hook antigen-bundle-defer
# Process all deferred bundles.
local bundle
for bundle in ${_DEFERRED_BUNDLE[@]}; do
LOG "Processing deferred bundle: ${bundle}" DEFER
antigen-bundle $bundle
done
unset _DEFERRED_BUNDLE
}
antigen-add-hook antigen-apply antigen-apply-defer pre once
}
# Initialize lock lib
-antigen-lock-init () {
# Default lock path.
-antigen-set-default ANTIGEN_LOCK $ADOTDIR/.lock
typeset -g _ANTIGEN_LOCK_PROCESS=false
# Use env variable to determine if we should load this extension
-antigen-set-default ANTIGEN_MUTEX true
# Set ANTIGEN_MUTEX to false to avoid loading this extension
if [[ $ANTIGEN_MUTEX == true ]]; then
return 0;
fi
# Do not use mutex
return 1;
}
-antigen-lock-execute () {
# Hook antigen command in order to check/create a lock file.
# This hook is only run once then releases itself.
antigen-lock () {
LOG "antigen-lock called"
# If there is a lock set up then we won't process anything.
if [[ -f $ANTIGEN_LOCK ]]; then
# Set up flag do the message is not repeated for each antigen-* command
[[ $_ANTIGEN_LOCK_PROCESS == false ]] && printf "Antigen: Another process in running.\n"
_ANTIGEN_LOCK_PROCESS=true
# Do not further process hooks. For this hook to properly work it
# should be registered first.
return -1
fi
WARN "Creating antigen-lock file at $ANTIGEN_LOCK"
touch $ANTIGEN_LOCK
}
antigen-add-hook antigen antigen-lock pre once
# Hook antigen-apply in order to release .lock file.
antigen-apply-lock () {
WARN "Freeing antigen-lock file at $ANTIGEN_LOCK"
unset _ANTIGEN_LOCK_PROCESS
rm -f $ANTIGEN_LOCK &> /dev/null
}
antigen-add-hook antigen-apply antigen-apply-lock post once
}
# Initialize parallel lib
-antigen-parallel-init () {
WARN "Init parallel extension" PARALLEL
typeset -ga _PARALLEL_BUNDLE; _PARALLEL_BUNDLE=()
if -antigen-interactive-mode; then
return 1
fi
}
-antigen-parallel-execute() {
WARN "Exec parallel extension" PARALLEL
# Install bundles in parallel
antigen-bundle-parallel-execute () {
WARN "Parallel antigen-bundle-parallel-execute" PARALLEL
typeset -a pids; pids=()
local args pid
WARN "Gonna install in parallel ${#_PARALLEL_BUNDLE} bundles." PARALLEL
# Do ensure-repo in parallel
WARN "${_PARALLEL_BUNDLE}" PARALLEL
typeset -Ua repositories # Used to keep track of cloned repositories to avoid
# trying to clone it multiple times.
for args in ${_PARALLEL_BUNDLE}; do
typeset -A bundle; -antigen-parse-args 'bundle' ${=args}
if [[ ! -d ${bundle[dir]} && $repositories[(I)${bundle[url]}] == 0 ]]; then
WARN "Install in parallel ${bundle[name]}." PARALLEL
echo "Installing ${bundle[name]}!..."
# $bundle[url]'s format is "url|branch" as to create "$ANTIGEN_BUNDLES/bundle/name-branch",
# this way you may require multiple branches from the same repository.
-antigen-ensure-repo "${bundle[url]}" > /dev/null &!
pids+=($!)
else
WARN "Bundle ${bundle[name]} already cloned locally." PARALLEL
fi
repositories+=(${bundle[url]})
done
# Wait for all background processes to end
while [[ $#pids > 0 ]]; do
for pid in $pids; do
# `ps` may diplay an error message such "Signal 18 (CONT) caught by ps
# (procps-ng version 3.3.9).", see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732410
if [[ $(ps -o pid= -p $pid 2>/dev/null) == "" ]]; then
pids[$pids[(I)$pid]]=()
fi
done
sleep .5
done
builtin local bundle &> /dev/null
for bundle in ${_PARALLEL_BUNDLE[@]}; do
antigen-bundle $bundle
done
WARN "Parallel install done" PARALLEL
}
# Hooks antigen-apply in order to release hooked functions
antigen-apply-parallel () {
WARN "Parallel pre-apply" PARALLEL PRE-APPLY
#antigen-remove-hook antigen-pre-apply-parallel
# Hooks antigen-bundle in order to parallel its execution.
antigen-bundle-parallel () {
TRACE "antigen-bundle-parallel: $@" PARALLEL
_PARALLEL_BUNDLE+=("${(j: :)${@}}")
}
antigen-add-hook antigen-bundle antigen-bundle-parallel replace
}
antigen-add-hook antigen-apply antigen-apply-parallel pre once
antigen-apply-parallel-execute () {
WARN "Parallel replace-apply" PARALLEL REPLACE-APPLY
antigen-remove-hook antigen-bundle-parallel
# Process all parallel bundles.
antigen-bundle-parallel-execute
unset _PARALLEL_BUNDLE
antigen-remove-hook antigen-apply-parallel-execute
antigen-apply
}
antigen-add-hook antigen-apply antigen-apply-parallel-execute replace once
}
typeset -ga _ZCACHE_BUNDLE_SOURCE _ZCACHE_CAPTURE_BUNDLE
typeset -g _ZCACHE_CAPTURE_PREFIX
# Generates cache from listed bundles.
#
# Iterates over _ANTIGEN_BUNDLE_RECORD and join all needed sources into one,
# if this is done through -antigen-load-list.
# Result is stored in ANTIGEN_CACHE.
#
# _ANTIGEN_BUNDLE_RECORD and fpath is stored in cache.
#
# Usage
# -zcache-generate-cache
#
# Returns
# Nothing. Generates ANTIGEN_CACHE
-antigen-cache-generate () {
local -aU _fpath _PATH _sources
local record
LOG "Gonna generate cache for $_ZCACHE_BUNDLE_SOURCE"
for record in $_ZCACHE_BUNDLE_SOURCE; do
record=${record:A}
# LOG "Caching $record"
if [[ -f $record ]]; then
# Adding $'\n' as a suffix as j:\n: doesn't work inside a heredoc.
if [[ $_ANTIGEN_THEME_COMPAT == true && "$record" == *.zsh-theme* ]]; then
local compat="${record:A}.antigen-compat"
echo "# Generated by Antigen. Do not edit!" >! "$compat"
cat $record | sed -Ee '/\{$/,/^\}/!{
s/^local //
}' >>! "$compat"
record="$compat"
fi
_sources+=("source '${record}';"$'\n')
elif [[ -d $record ]]; then
_PATH+=("${record}")
_fpath+=("${record}")
fi
done
cat > $ANTIGEN_CACHE <<EOC
#-- START ZCACHE GENERATED FILE
#-- GENERATED: $(date)
#-- ANTIGEN v2.2.2
$(functions -- _antigen)
antigen () {
local MATCH MBEGIN MEND
[[ "\$ZSH_EVAL_CONTEXT" =~ "toplevel:*" || "\$ZSH_EVAL_CONTEXT" =~ "cmdarg:*" ]] && source "$_ANTIGEN_INSTALL_DIR/antigen.zsh" && eval antigen \$@;
return 0;
}
typeset -gaU fpath path
fpath+=(${_fpath[@]}) path+=(${_PATH[@]})
_antigen_compinit () {
autoload -Uz compinit; compinit -d "$ANTIGEN_COMPDUMP"; compdef _antigen antigen
add-zsh-hook -D precmd _antigen_compinit
}
autoload -Uz add-zsh-hook; add-zsh-hook precmd _antigen_compinit
compdef () {}
if [[ -n "$ZSH" ]]; then
ZSH="$ZSH"; ZSH_CACHE_DIR="$ZSH_CACHE_DIR"
fi
#--- BUNDLES BEGIN
${(j::)_sources}
#--- BUNDLES END
typeset -gaU _ANTIGEN_BUNDLE_RECORD; _ANTIGEN_BUNDLE_RECORD=($(print ${(qq)_ANTIGEN_BUNDLE_RECORD}))
typeset -g _ANTIGEN_CACHE_LOADED; _ANTIGEN_CACHE_LOADED=true
typeset -ga _ZCACHE_BUNDLE_SOURCE; _ZCACHE_BUNDLE_SOURCE=($(print ${(qq)_ZCACHE_BUNDLE_SOURCE}))
typeset -g _ANTIGEN_CACHE_VERSION; _ANTIGEN_CACHE_VERSION='v2.2.2'
#-- END ZCACHE GENERATED FILE
EOC
{ zcompile "$ANTIGEN_CACHE" } &!
# Compile config files, if any
LOG "CHECK_FILES $ANTIGEN_CHECK_FILES"
[[ $ANTIGEN_AUTO_CONFIG == true && -n $ANTIGEN_CHECK_FILES ]] && {
echo ${(j:\n:)ANTIGEN_CHECK_FILES} >! "$ANTIGEN_RSRC"
for rsrc in $ANTIGEN_CHECK_FILES; do
zcompile $rsrc
done
} &!
return true
}
# Initializes caching mechanism.
#
# Hooks `antigen-bundle` and `antigen-apply` in order to defer bundle install
# and load. All bundles are loaded from generated cache rather than dynamically
# as these are bundled.
#
# Usage
# -antigen-cache-init
# Returns
# Nothing
-antigen-cache-init () {
if -antigen-interactive-mode; then
return 1
fi
_ZCACHE_CAPTURE_PREFIX=${_ZCACHE_CAPTURE_PREFIX:-"--zcache-"}
_ZCACHE_BUNDLE_SOURCE=(); _ZCACHE_CAPTURE_BUNDLE=()
# Cache auto config files to check for changes (.zshrc, .antigenrc etc)
-antigen-set-default ANTIGEN_AUTO_CONFIG true
# Default cache path.
-antigen-set-default ANTIGEN_CACHE $ADOTDIR/init.zsh
-antigen-set-default ANTIGEN_RSRC $ADOTDIR/.resources
if [[ $ANTIGEN_CACHE == false ]]; then
return 1
fi
return 0
}
-antigen-cache-execute () {
# Main function. Deferred antigen-apply.
antigen-apply-cached () {
# TRACE "APPLYING CACHE" EXT
# Auto determine check_files
# There always should be 5 steps from original source as the correct way is to use
# `antigen` wrapper not `antigen-apply` directly and it's called by an extension.
LOG "TRACE: ${funcfiletrace}"
if [[ $ANTIGEN_AUTO_CONFIG == true && $#ANTIGEN_CHECK_FILES -eq 0 ]]; then
ANTIGEN_CHECK_FILES+=(~/.zshrc)
if [[ $#funcfiletrace -ge 6 ]]; then
ANTIGEN_CHECK_FILES+=("${${funcfiletrace[6]%:*}##* }")
fi
fi
# Generate and compile cache
-antigen-cache-generate
[[ -f "$ANTIGEN_CACHE" ]] && source "$ANTIGEN_CACHE";
# Commented out in order to have a working `cache-gen` command
#unset _ZCACHE_BUNDLE_SOURCE
unset _ZCACHE_CAPTURE_BUNDLE _ZCACHE_CAPTURE_FUNCTIONS
# Release all hooked functions
antigen-remove-hook -antigen-load-env-cached
antigen-remove-hook -antigen-load-source-cached
antigen-remove-hook antigen-bundle-cached
}
antigen-add-hook antigen-apply antigen-apply-cached post once
# Defer antigen-bundle.
antigen-bundle-cached () {
_ZCACHE_CAPTURE_BUNDLE+=("${(j: :)${@}}")
}
antigen-add-hook antigen-bundle antigen-bundle-cached pre
# Defer loading.
-antigen-load-env-cached () {
local bundle
typeset -A bundle; bundle=($@)
local location=${bundle[dir]}/${bundle[loc]}
# Load to path if there is no sourceable
if [[ ${bundle[loc]} == "/" ]]; then
_ZCACHE_BUNDLE_SOURCE+=("${location}")
return
fi
_ZCACHE_BUNDLE_SOURCE+=("${location}")
}
antigen-add-hook -antigen-load-env -antigen-load-env-cached replace
# Defer sourcing.
-antigen-load-source-cached () {
_ZCACHE_BUNDLE_SOURCE+=($@)
}
antigen-add-hook -antigen-load-source -antigen-load-source-cached replace
return 0
}
# Generate static-cache file at $ANTIGEN_CACHE using currently loaded
# bundles from $_ANTIGEN_BUNDLE_RECORD
#
# Usage
# antigen-cache-gen
#
# Returns
# Nothing
antigen-cache-gen () {
-antigen-cache-generate
}
#compdef _antigen
# Setup antigen's autocompletion
_antigen () {
local -a _1st_arguments
_1st_arguments=(
'apply:Load all bundle completions'
'bundle:Install and load the given plugin'
'bundles:Bulk define bundles'
'cleanup:Clean up the clones of repos which are not used by any bundles currently loaded'
'cache-gen:Generate cache'
'init:Load Antigen configuration from file'
'list:List out the currently loaded bundles'
'purge:Remove a cloned bundle from filesystem'
'reset:Clears cache'
'restore:Restore the bundles state as specified in the snapshot'
'revert:Revert the state of all bundles to how they were before the last antigen update'
'selfupdate:Update antigen itself'
'snapshot:Create a snapshot of all the active clones'
'theme:Switch the prompt theme'
'update:Update all bundles'
'use:Load any (supported) zsh pre-packaged framework'
);
_1st_arguments+=(
'help:Show this message'
'version:Display Antigen version'
)
__bundle() {
_arguments \
'--loc[Path to the location <path-to/location>]' \
'--url[Path to the repository <github-account/repository>]' \
'--branch[Git branch name]' \
'--no-local-clone[Do not create a clone]'
}
__list() {
_arguments \
'--simple[Show only bundle name]' \
'--short[Show only bundle name and branch]' \
'--long[Show bundle records]'
}
__cleanup() {
_arguments \
'--force[Do not ask for confirmation]'
}
_arguments '*:: :->command'
if (( CURRENT == 1 )); then
_describe -t commands "antigen command" _1st_arguments
return
fi
local -a _command_args
case "$words[1]" in
bundle)
__bundle
;;
use)
compadd "$@" "oh-my-zsh" "prezto"
;;
cleanup)
__cleanup
;;
(update|purge)
compadd $(type -f \-antigen-get-bundles &> /dev/null || antigen &> /dev/null; -antigen-get-bundles --simple 2> /dev/null)
;;
theme)
compadd $(type -f \-antigen-get-themes &> /dev/null || antigen &> /dev/null; -antigen-get-themes 2> /dev/null)
;;
list)
__list
;;
esac
}
zmodload zsh/datetime
ANTIGEN_DEBUG_LOG=${ANTIGEN_DEBUG_LOG:-${ADOTDIR:-$HOME/.antigen}/debug.log}
LOG () {
local PREFIX="[LOG][${EPOCHREALTIME}]"
echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG
}
ERR () {
local PREFIX="[ERR][${EPOCHREALTIME}]"
echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG
}
WARN () {
local PREFIX="[WRN][${EPOCHREALTIME}]"
echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@" >> $ANTIGEN_DEBUG_LOG
}
TRACE () {
local PREFIX="[TRA][${EPOCHREALTIME}]"
echo "${PREFIX} ${funcfiletrace[1]}\n${PREFIX} $@\n${PREFIX} ${(j:\n:)funcstack}" >> $ANTIGEN_DEBUG_LOG
}
-antigen-env-setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment