You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

81 lines
2.0 KiB

#!/bin/zsh
if [[ "$(locale LC_CTYPE)" == "UTF-8" ]]; then
setopt COMBINING_CHARS
fi
# Disable the log builtin, so we don't conflict with /usr/bin/log
disable log
# Save command history
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=99999999
SAVEHIST=$HISTSIZE
# Variables
export CASE_SENSITIVE="true"
export EDITOR=nvim
export GIT_EDITOR=nvim
export PATH="${HOME}/.local/bin/:${HOME}/go/bin:${HOME}/.cargo/bin:${PATH}"
if [[ $(uname) == 'Darwin' ]]; then
export HOMEBREW_NO_AUTO_UPDATE=1
export PATH="/opt/homebrew/lib/ruby/gems/3.3.0:$PATH"
export PATH="/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0:$PATH"
eval "$(rbenv init - zsh)"
fi
# Auto complete case insensitive
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# Load colors
autoload -U colors && colors
# Automatically cd into typed directory.
setopt autocd
# Useful support for interacting with Terminal.app or other terminal programs
[ -r "/etc/zshrc_$TERM_PROGRAM" ] && . "/etc/zshrc_$TERM_PROGRAM"
# Load Git completion
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
# vi mode
bindkey -v
export KEYTIMEOUT=1
# Edit line in vim with ctrl-e:
autoload edit-command-line; zle -N edit-command-line
bindkey '^e' edit-command-line
# Go up directory structures
up () {
cd $(printf "%0.0s../" $(seq 1 $1));
}
function cdf () {
cd $(find . -type d -print | fzf)
}
# Load aliases
source ~/.config/aliasrc
# Android dev config
export ANDROID_HOME="$HOME/Android/Sdk"
if [[ $(uname) == 'Darwin' ]]; then
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
fi
export PATH="${PATH}:${ANDROID_HOME}/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
source <(fzf --zsh)
eval "$(oh-my-posh init zsh --config $HOME/.config/oh-my-posh/zen.toml)"