summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Davis <tydavis@gmail.com>2023-07-31 15:39:54 -0700
committerTyler Davis <tydavis@gmail.com>2023-07-31 15:39:54 -0700
commitd80ea087ac010f61a63d9d677a26290eb75b6304 (patch)
treeb29001269378fc87546241bf8a8c242c77a8f564
parent027953164c8b9ec678789b41db99a29968c52158 (diff)
downloaddotfiles-d80ea087ac010f61a63d9d677a26290eb75b6304.tar.gz
dotfiles-d80ea087ac010f61a63d9d677a26290eb75b6304.zip
zsh: common pathuniq
-rw-r--r--.zshrc49
1 files changed, 13 insertions, 36 deletions
diff --git a/.zshrc b/.zshrc
index 2b74280..cb16d96 100644
--- a/.zshrc
+++ b/.zshrc
@@ -11,30 +11,23 @@ case "$OSTYPE" in
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
+
+ # Load config from filesystem
export AWS_SDK_LOAD_CONFIG=1
+ # Add Local bin
export PATH=$PATH:/Users/tydavis/.local/bin
- # Unlock Keychain
+ # Unlock Keychain cli
alias unlock='security unlock-keychain ~/Library/Keychains/login.keychain'
;;
@@ -44,19 +37,15 @@ case "$OSTYPE" in
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
-
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/tydavis/.gcloud/google-cloud-sdk/path.zsh.inc' ]; then . '/home/tydavis/.gcloud/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/tydavis/.gcloud/google-cloud-sdk/completion.zsh.inc' ]; then . '/home/tydavis/.gcloud/google-cloud-sdk/completion.zsh.inc'; fi
- `eval ~/.local/bin/pathuniq`
;;
dragonfly*|freebsd*|netbsd*|openbsd*)
# No BSD yet
@@ -112,6 +101,9 @@ if [ "$(command -v code)" ]; then
export EDITOR="code"
export VISUAL="code"
else
+ if [ ! "$(command -v vim)" ]; then
+ alias vim=vi
+ fi
export EDITOR="vim"
export VISUAL="vim"
fi
@@ -183,24 +175,9 @@ alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
# dotfiles config --local status.showUntrackedFiles no
## == END DOTFILES ==
+if [ -f "$HOME/.local/bin/pathuniq" ]; then
+ `eval ~/.local/bin/pathuniq`
+fi
+
## == 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
-#