Linux_frogg-profile.d/inc/ps1.sh

45 lines
1.9 KiB
Bash

# Shortucts for server config info
alias cmd='bash /etc/profile.d/info/cmd'
alias conf='bash /etc/profile.d/info/conf'
alias welcome='bash /etc/profile.d/custom.sh'
# Shortcuts 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='sudo find / \( -path /proc -o -path /sys -o -path /dev -o -path /run \) -prune -o -type f -name'
#Shortcuts APT
update='sudo apt update && sudo apt upgrade -y'
install='sudo apt install'
remove='sudo apt remove'
#Shortcuts 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'
#Shortcut network
alias myip='curl ifconfig.me'
alias localip='ip a'
#Shortcut Apache
alias web-restart='systemctl restart apache2'
alias web-err='tail -fn 100 /var/log/apache2/error.log'
alias web-log='tail -fn 100 /var/log/apache2/access.log /var/log/apache2/error.log'
# Frogg version
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\][\[\033[01;91m\]\u\[\033[01;34m\]@\[\033[01;91m\]\h\[\033[01;34m\]]\[\033[01;34m\] \w\[\033[01;37m\] >'
# Github https://gist.github.com/justintv/168835
#PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[0;32m\]\n$(git branch 2>/dev/null | grep "^*" | colrm 1 2)\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] '
# Mixed version
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\][\[\033[01;91m\]\u\[\033[01;34m\]@\[\033[01;91m\]\h\[\033[01;34m\]]\[\033[01;34m\] \w\[\033[01;37m\] \n$(git branch --show-current 2>/dev/null)\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] '