Add zsh-autosuggestions

This commit is contained in:
2022-10-20 14:23:45 -05:00
parent 4a3bbdc72e
commit 0919ec2fa4
7 changed files with 8 additions and 3 deletions

53
sh/custom-scripts/aliases.sh Executable file
View File

@ -0,0 +1,53 @@
ALIASES=${TOOLKIT}/sh/custom_scripts/aliases.sh
VARS=${TOOLKIT}/sh/custom_scripts/vars.sh
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ls='ls --color=auto --group-directories-first -N'
alias ll='ls -l'
alias la='ls -A'
alias lf='ls -F'
alias l.='ls -d .*'
alias lh='ls -lh'
alias lr='ls -R'
alias l='ls'
alias md='mkdir -p'
alias rd='rm -rf'
alias q='exit'
alias c='clear'
alias journal='journalctl -xe'
alias journal-err='journalctl -p 3 -b'
alias fstab='sudo vim /etc/fstab'
alias rcron='sudo crontab -e'
alias cron='crontab -e'
alias upd-arch='paru -S archlinux-keyring && paru'
alias upd-ubt='sudo apt update -y && sudo apt upgrade -y'
if [[ "$OS" == "Arch Linux" ]]; then
alias upd='upd-arch'
elif [[ $OS == "Ubuntu" ]]; then
alias upd='upd-ubt'
else
alias upd='echo Failed to detect distribution. The script needs to be able to determine the distribution to know which package manager to use'
fi
alias reload='source ~/.zshrc'
alias aliases='cat $ALIASES'
alias vars='cat $VARS'
alias ealiases='_ vim $ALIASES'
alias evars='_ vim $VARS'
here() {
grep -r "$@" .
}

29
sh/custom-scripts/os.sh Executable file
View File

@ -0,0 +1,29 @@
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
OS=$NAME
VER=$VERSION_ID
elif type lsb_release >/dev/null 2>&1; then
# linuxbase.org
OS=$(lsb_release -si)
VER=$(lsb_release -sr)
elif [ -f /etc/lsb-release ]; then
# For some versions of Debian/Ubuntu without lsb_release command
. /etc/lsb-release
OS=$DISTRIB_ID
VER=$DISTRIB_RELEASE
elif [ -f /etc/debian_version ]; then
# Older Debian/Ubuntu/etc.
OS=Debian
VER=$(cat /etc/debian_version)
elif [ -f /etc/SuSe-release ]; then
# Older SuSE/etc.
...
elif [ -f /etc/redhat-release ]; then
# Older Red Hat, CentOS, etc.
...
else
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
OS=$(uname -s)
VER=$(uname -r)
fi

4
sh/custom-scripts/vars.sh Executable file
View File

@ -0,0 +1,4 @@
export LESS="-RM"
export MAKEFLAGS=-j8
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'