devconf/shell/.zshrc

40 lines
880 B
Bash
Raw Normal View History

2024-02-15 12:10:06 +00:00
setopt extendedglob
2023-11-12 18:12:59 +00:00
export ZSH="$HOME/.oh-my-zsh"
2024-02-15 12:10:06 +00:00
export EDITOR="vim"
export CFLAGS="-march=native -O2"
export CXXFLAGS="$CFLAGS"
export MAKEOPTS="-j$(cat /proc/cpuinfo | awk -F: '$1 ~ /cpu cores/ { print $2 }' | head -n 1 | tr -d ' ')"
2023-11-12 18:12:59 +00:00
2024-02-15 12:10:06 +00:00
if [ -n "$(command -v clang)" ]; then
export CC=clang
else
export CC=gcc
fi
2023-11-12 18:12:59 +00:00
2024-02-15 12:10:06 +00:00
if [ -n "$(command -v clang++)" ]; then
export CXX=clang++
else
export CXX=g++
fi
if [ -n "$(command -v ruby)" ] && [ -n "$(command -v gem)" ]; then
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi
2023-11-13 17:48:38 +00:00
2024-02-22 10:57:35 +00:00
[[ ! -r $HOME/.cargo/env ]] || source $HOME/.cargo/env > /dev/null 2> /dev/null
2023-11-13 17:48:38 +00:00
# pnpm
2024-02-22 10:57:35 +00:00
export PNPM_HOME="$HOME/.local/share/pnpm"
2023-11-13 17:48:38 +00:00
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
2024-02-15 12:10:06 +00:00
# pnpm end
source $ZSH/oh-my-zsh.sh
source ~/.zplug/init.zsh
source ~/.zcustom/init.zsh
eval "$(zoxide init zsh)"