#!/bin/bash

#region Shortcut CUSTOM
alias cmd='bash /etc/profile.d/info/cmd'
alias conf='bash /etc/profile.d/info/conf'
alias colors='bash /etc/profile.d/info/colors'
alias welcome='bash /etc/profile.d/777-welcome.sh'
alias reconf='bash /etc/profile.d/script/install.sh'
#endregion

#region Shortcut BASICS
alias cls='clear'
alias ll='ls -lah'
alias lh='ls -lisah'
alias ..='cd ..'
alias ...='cd ../..'
alias home='welcome && cd ~'
alias ffs='find / \( -path /proc -o -path /sys -o -path /dev -o -path /run \) -prune -o -type f -iname'
alias ff='find / \( -path /proc -o -path /sys -o -path /dev -o -path /run \) -prune -o -type f -name'
#endregion

#region Shortcut APT
alias update='apt update && sudo apt upgrade -y'
alias script='apt script'
alias remove='apt remove'
#endregion

#region Shortcut DEBUG
alias func='declare -F'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias ports='netstat -tulanp'
alias psg='ps aux | grep -i'
#alias top='htop'
alias cpu='top -o %CPU'
alias mem='top -o %MEM'
alias hdd='ncdu'
#endregion

#region Shortcut NETWORK
alias myip='curl ifconfig.me'
alias localip='ip a'
#endregion

#region Shortcut APACHE
alias wra='systemctl restart apache2'
alias werr='tail -fn 100 /var/log/apache2/error.log'
alias wlog='tail -fn 100 /var/log/apache2/access.log /var/log/apache2/error.log'
#endregion

#region Shortcut GIT
# LOAD GIT FUNCS
if [[ -z "${WELCOME_SCRIPT_PATH}" ]]; then
  WELCOME_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)"
fi
. "${WELCOME_SCRIPT_PATH}/config/config_git.sh"
. "${WELCOME_SCRIPT_PATH}/func/git.sh"

# init repo
alias gitinit='gitinit'
# get last changes
alias gitsync='gitsync'
# restore as depot
alias gitreset='gitreset'
# classical git clone depot
alias gitclone='gitclone'
# change depot url
alias giturl='giturl'
# enable / disable ssl verification
alias gitssl='gitssl'
# ajout d'une version
alias gitversion='gitversion'
#endregion

