Last active
May 8, 2024 09:53
-
-
Save burhan/d63a7f9641d2a5bd20144e3778e78314 to your computer and use it in GitHub Desktop.
common zshrc configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias eza='eza -xZo --smart-group --icons --header --git --time-style "long-iso"' | |
alias exa='eza' | |
alias ls='lsd' | |
alias ll='lsd -laG' | |
alias l.='lsd -dG .*' | |
alias tree='lsd -l --tree --depth=2' | |
alias grep='grep --color' | |
alias ..='cd ..' | |
alias ....='cd ../..' | |
alias ......='cd ../../..' | |
alias docker-clean-all='docker stop $(docker container ls -aq) && docker system prune -a -f --volumes' | |
# the yolo shotgun approach to update the system | |
alias updateall='softwareupdate -a -i; brew update && brew upgrade && brew cleanup; rustup update && cargo install' | |
export POSH_SESSION_DEFAULT_USER=$USER | |
export JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=true | |
export CFLAGS="-I$(brew --prefix openssl)/include" | |
export LDFLAGS="-L$(brew --prefix openssl)/lib" | |
export MISE_PYTHON_PRECOMPILED_ARCH="aarch64-apple-darwin" | |
export MISE_PYTHON_COMPILE="true" | |
export PYTHONIOENCODING="UTF-8" | |
export DOTNET_CLI_TELEMETRY_OPTOUT="true" | |
export BAT_THEME="Monokai Extended Bright" | |
export MANPAGER="sh -c 'col -bx | bat -l man -p'" # uses bat for colorizing man pages | |
# automatically set the right color scheme for LS_COLORS | |
if [[ $(defaults read -g AppleInterfaceStyle 2>/dev/null) != "Dark" ]]; then | |
export LS_COLORS="$(vivid generate ayu)" | |
else | |
export LS_COLORS="$(vivid generate molokai)" | |
fi | |
# fzf & fzf-tab | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh | |
[ ! -f ~/work/tools/fzf-tab/fzf-tab.plugin.zsh ] || source ~/work/tools/fzf-tab/fzf-tab.plugin.zsh | |
# flush DNS | |
flushdns() { | |
echo "Flushing DNS cache..." | |
sudo dscacheutil -flushcache | |
sudo killall -HUP mDNSResponder | |
} | |
# list open ports | |
openports() { | |
sudo lsof -iTCP -sTCP:LISTEN -P | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment