Clean ZSH configuration
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
is_debian_based() {
|
is_debian_based() {
|
||||||
# Controllo /etc/os-release
|
# Checking /etc/os-release
|
||||||
if [[ -f /etc/os-release ]]; then
|
if [[ -f /etc/os-release ]]; then
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
if [[ "$ID_LIKE" == *"debian"* ]] || [[ "$ID" == "debian" ]]; then
|
if [[ "$ID_LIKE" == *"debian"* ]] || [[ "$ID" == "debian" ]]; then
|
||||||
@@ -7,15 +7,14 @@ is_debian_based() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Controllo alternativo: /etc/debian_version
|
# Alternative check: /etc/debian_version
|
||||||
if [[ -f /etc/debian_version ]]; then
|
if [[ -f /etc/debian_version ]]; then
|
||||||
return 0 # OK: Debian-based
|
return 0 # OK: Debian-based
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 1 # NON Debian-based
|
return 1 # NO Debian-based
|
||||||
}
|
}
|
||||||
|
|
||||||
# Alias del comando ls
|
|
||||||
alias ls="eza --color=always --group-directories-first --icons"
|
alias ls="eza --color=always --group-directories-first --icons"
|
||||||
alias ll="eza -l --color=always --group-directories-first --icons"
|
alias ll="eza -l --color=always --group-directories-first --icons"
|
||||||
alias la="eza -a --color=always --group-directories-first --icons"
|
alias la="eza -a --color=always --group-directories-first --icons"
|
||||||
@@ -36,30 +35,13 @@ alias grep='ugrep --color=auto'
|
|||||||
alias egrep='ugrep -E --color=auto'
|
alias egrep='ugrep -E --color=auto'
|
||||||
alias fgrep='ugrep -F --color=auto'
|
alias fgrep='ugrep -F --color=auto'
|
||||||
|
|
||||||
# Alias vari
|
# Other aliases
|
||||||
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
|
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
|
||||||
alias mkdir="mkdir -pv"
|
|
||||||
alias journalctl='sudo journalctl'
|
|
||||||
alias failed='sudo systemctl --failed'
|
|
||||||
alias se='ls /usr/bin | grep'
|
|
||||||
alias du='du -h'
|
alias du='du -h'
|
||||||
alias please='sudo $(fc -ln -1)'
|
|
||||||
alias userlist="cut -d: -f1 /etc/passwd | sort"
|
alias userlist="cut -d: -f1 /etc/passwd | sort"
|
||||||
alias fhere="find . -name "
|
|
||||||
alias free="free -mth"
|
|
||||||
alias ps="ps auxf"
|
|
||||||
alias ip='ip -color'
|
alias ip='ip -color'
|
||||||
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
|
|
||||||
alias wget="wget -c"
|
|
||||||
alias histg="history | grep"
|
|
||||||
alias myip="curl http://ipecho.net/plain; echo"
|
|
||||||
alias logs="find /var/log -type f -exec file {} \; | grep 'text' | cut -d' ' -f1 | sed -e's/:$//g' | grep -v '[0-9]$' | xargs tail -f"
|
|
||||||
alias folders='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn'
|
|
||||||
alias vpn-add='nmcli connection import type openvpn file'
|
|
||||||
alias pbcopy='xsel --clipboard --input'
|
alias pbcopy='xsel --clipboard --input'
|
||||||
alias pbpaste='xsel --clipboard --output'
|
alias pbpaste='xsel --clipboard --output'
|
||||||
alias stow='stow --dotfiles -d ~/.dotfiles '
|
alias stow='stow --dotfiles -d ~/.dotfiles '
|
||||||
alias openport='netstat -nape --inet'
|
alias openport='netstat -nape --inet'
|
||||||
alias kssh='kitty +kitten ssh'
|
alias kssh='kitty +kitten ssh'
|
||||||
alias lzg=lazygit
|
|
||||||
alias lzd=lazydocker
|
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
|
|||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#if command -v oh-my-posh > /dev/null 2>&1; then
|
|
||||||
# # Initialize Oh My Posh
|
|
||||||
# eval "$(oh-my-posh init zsh --config "$(brew --prefix oh-my-posh)/themes/peru.omp.json")"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
if command -v starship > /dev/null 2>&1; then
|
if command -v starship > /dev/null 2>&1; then
|
||||||
# Initialize Starship
|
# Initialize Starship
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|||||||
30
zsh/.zshrc
30
zsh/.zshrc
@@ -74,41 +74,11 @@ ZSH_CUSTOM=$ZSH/custom
|
|||||||
# Add wisely, as too many plugins slow down shell startup.
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(
|
plugins=(
|
||||||
aws
|
aws
|
||||||
azure
|
|
||||||
battery
|
|
||||||
brew
|
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
colorize
|
|
||||||
command-not-found
|
command-not-found
|
||||||
dnf
|
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
eza
|
|
||||||
git
|
|
||||||
git-auto-fetch
|
|
||||||
git-extras
|
|
||||||
git-flow
|
|
||||||
github
|
|
||||||
gitignore
|
gitignore
|
||||||
git-prompt
|
|
||||||
golang
|
|
||||||
httpie
|
|
||||||
jsontools
|
|
||||||
keychain
|
keychain
|
||||||
k9s
|
|
||||||
kitty
|
|
||||||
kubectl
|
|
||||||
kubectx
|
|
||||||
macos
|
|
||||||
man
|
|
||||||
minikube
|
|
||||||
mise
|
mise
|
||||||
mvn
|
|
||||||
profiles
|
|
||||||
ssh
|
|
||||||
ssh-agent
|
|
||||||
themes
|
|
||||||
tmux
|
|
||||||
zoxide
|
zoxide
|
||||||
zsh-interactive-cd
|
zsh-interactive-cd
|
||||||
zsh-navigation-tools
|
zsh-navigation-tools
|
||||||
|
|||||||
Reference in New Issue
Block a user