# The following lines were added by compinstall # #zstyle ':completion:*' completer _complete _ignored #zstyle :compinstall filename '/Users/tydavis/.zshrc' # for ZSH case "$OSTYPE" in darwin*) # ZSH Settings zstyle ':completion:*' completer _complete _ignored zstyle :compinstall filename '/Users/tydavis/.zshrc' # == OSX Settings == # Set for rust ssl builds #if [[ ! -v OPENSSL_DIR ]]; then # export OPENSSL_DIR="/private/etc/ssl" #fi # Disable weird ZSH sessions export SHELL_SESSIONS_DISABLE=1 if [[ ! -f '~/.zsh_sessions_disable' ]]; then touch ~/.zsh_sessions_disable fi if [ $(command -v python3) ]; then export PATH=$(python3 -m site --user-base)/bin:$PATH fi # Brew clauses if [ -f '/opt/homebrew/bin/brew' ]; then eval "$(/opt/homebrew/bin/brew shellenv)" export PATH=/opt/homebrew/bin:$PATH:$HOME/.cargo/bin:/Users/tydavis/.golang/go/bin fi export AWS_SDK_LOAD_CONFIG=1 export PATH=$PATH:/Users/tydavis/.local/bin # Unlock Keychain alias unlock='security unlock-keychain ~/Library/Keychains/login.keychain' ;; linux*) # ZSH Settings zstyle ':completion:*' completer _complete _ignored zstyle :compinstall filename '/home/tydavis/.zshrc' autoload -U compinit compinit -i # == Archlinux (?) settings alias psc='ps xawf -eo pid,user,cgroup,args' alias gdb='gdb -tui' # Rust GDB export PYTHONPATH=$PYTHONPATH:$HOME/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc `eval ~/.local/bin/pathuniq-rs` ;; dragonfly*|freebsd*|netbsd*|openbsd*) # No BSD yet ;; esac autoload -Uz compinit compinit # End of lines added by compinstall # Lines configured by zsh-newuser-install HISTFILE=~/.histfile HISTSIZE=10000 SAVEHIST=10000 setopt appendhistory unsetopt autocd beep extendedglob #bindkey -e bindkey -v # End of lines configured by zsh-newuser-install # ZSH VIM MODE export KEYTIMEOUT=1 ### # == Universal Configs == if [ -d "$HOME/.golang" ]; then ### Just in case it's missing mkdir -p ~/.golang/path # Go in the homedir export GOROOT_BOOTSTRAP=$HOME/.golang/go_bootstrap export GOROOT=$HOME/.golang/go export GOPATH=$HOME/.golang/path export GOPRIVATE=github.com/hpe-hcss export PATH=$HOME/.golang/go/bin:$PATH:$HOME/.cargo/bin:$HOME/.golang/path/bin:$HOME/.local/bin fi # Add Rust paths if present if [ -f "$HOME/.cargo/env" ]; then source "$HOME/.cargo/env" fi if [ "$(command -v code)" ]; then export EDITOR="code" export VISUAL="code" else export EDITOR="vim" export VISUAL="vim" fi # Ensure less always uses the one-page, raw control characters, and no-init settings export LESS=FRX # Defaults alias ls='/bin/ls -F' ## Zstd always uses all cores if [ "$(command -v zstd)" ]; then alias zstd='zstd -T0' fi # == Rust Tools ==# if [ "$(command -v exa)" ]; then unalias -m 'l.' unalias -m 'll' unalias -m 'l' unalias -m 'la' unalias -m 'ls' alias ls='exa -G --color never -a -s type -F --time-style=long-iso' alias ll='exa -l --color never -a -s type -F --time-style=long-iso' fi if [ "$(command -v bat)" ]; then unalias -m 'cat' alias cat='bat -pp' export BAT_THEME="ansi" fi if [ "$(command -v ncdu)" ]; then alias ncdu="ncdu --color=off" fi if [ "$(command -v btm)" ]; then alias btm="btm -m -l --mem_as_value " fi # Podman if [ "$(command -v podman)" ]; then alias docker=podman fi # == END TOOLS == ## == DOTFILES == # To load files # git clone --bare https://github.com/tydavis/dotfiles.git $HOME/.dotfiles #shorten the git dotfiles management alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' # Ignore files that aren't relevant # dotfiles config --local status.showUntrackedFiles no ## == END DOTFILES == ## == Prompt == export PS1="%m [%n:%c]%# " if [[ ! -v VSCODE_INJECTION ]]; then ## == TMUX sessions == if [ "$(command -v tmux)" ]; then tmux has-session -t main 2>/dev/null # Create the session if it doesn't exists. if [[ $? -ne 0 ]]; then TMUX='' tmux new-session -d -s main fi if [[ -z "$TMUX" ]]; then tmux attach-session -t main else tmux switch-client -t main fi fi fi