Updated .zshrc config based on MacOS changes
This commit is contained in:
parent
9c91b52508
commit
c1e22d5642
27
zsh/.zshrc
27
zsh/.zshrc
@ -160,9 +160,12 @@ precmd() {
|
||||
}
|
||||
|
||||
# enable color support of ls, less and man, and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
if [ $(uname -s) = "Darwin" ]; then
|
||||
alias ls='ls -G'
|
||||
else
|
||||
alias ls='ls --color=auto'
|
||||
fi
|
||||
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
@ -182,7 +185,6 @@ if [ -x /usr/bin/dircolors ]; then
|
||||
|
||||
# Take advantage of $LS_COLORS for completion as well
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
@ -201,7 +203,10 @@ if [ -f "/usr/share/zplug/init.zsh" ]; then
|
||||
source /usr/share/zplug/init.zsh
|
||||
elif [ -f "/usr/share/zsh/scripts/zplug/init.zsh" ]; then
|
||||
source /usr/share/zsh/scripts/zplug/init.zsh
|
||||
elif [ -f "/opt/homebrew/Cellar/zplug/2.4.2/init.zsh" ]; then
|
||||
source "/opt/homebrew/Cellar/zplug/2.4.2/init.zsh"
|
||||
fi
|
||||
|
||||
zplug romkatv/powerlevel10k, as:theme, depth:1
|
||||
zplug load
|
||||
|
||||
@ -210,6 +215,8 @@ if [ -f "/usr/share/doc/fzf/examples/completion.zsh" ]; then
|
||||
source /usr/share/doc/fzf/examples/completion.zsh
|
||||
elif [ -f "/usr/share/fzf/completion.zsh" ]; then
|
||||
source /usr/share/fzf/completion.zsh
|
||||
elif [ -f "/opt/homebrew/Cellar/fzf/0.39.0/shell/completion.zsh" ]; then
|
||||
source /opt/homebrew/Cellar/fzf/0.39.0/shell/completion.zsh
|
||||
else
|
||||
echo "completion.zsh not installed"
|
||||
fi
|
||||
@ -218,6 +225,8 @@ if [ -f "/usr/share/doc/fzf/examples/key-bindings.zsh" ]; then
|
||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||
elif [ -f "/usr/share/fzf/key-bindings.zsh" ]; then
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
elif [ -f "/opt/homebrew/Cellar/fzf/0.39.0/shell/key-bindings.zsh" ]; then
|
||||
source /opt/homebrew/Cellar/fzf/0.39.0/shell/key-bindings.zsh
|
||||
else
|
||||
echo "key-bidings.zsh not installed"
|
||||
fi
|
||||
@ -226,15 +235,14 @@ if [ -f "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
|
||||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
elif [ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
elif [ -f "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]; then
|
||||
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
else
|
||||
echo "zsh-autosuggestions.zsh not installed"
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "/usr/share/doc/pkgfile/command-not-found.zsh" ]; then
|
||||
source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||
else
|
||||
echo "command-not-found not installed"
|
||||
fi
|
||||
|
||||
# Fix arch linux valgrind issue.
|
||||
@ -244,8 +252,6 @@ fi
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# CUSTOM ALIASES & FUNCTIONS
|
||||
alias open='xdg-open'
|
||||
alias listen='rlwrap nc -lnvp'
|
||||
|
||||
# Cd multiple directoryies alias.
|
||||
function .. () {cd ..}
|
||||
@ -262,7 +268,7 @@ function up() {
|
||||
echo "http://$ip/$filepath"
|
||||
done
|
||||
done
|
||||
sudo python -m http.server 80
|
||||
sudo python3 -m http.server 80
|
||||
}
|
||||
|
||||
# Wordlists
|
||||
@ -270,6 +276,7 @@ export rockyou="/usr/share/seclists/Passwords/Leaked-Databases/rockyou.txt"
|
||||
export fasttrack="/usr/share/seclists/Passwords/fasttrack.txt"
|
||||
|
||||
# Ease of use
|
||||
alias open='xdg-open'
|
||||
alias tryhackme="sudo openvpn ~/.tryhackme.ovpn"
|
||||
alias vim="nvim"
|
||||
alias listen="rlwrap nc -lnvp"
|
||||
alias emacs="emacsclient -c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user