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.
 
 
 

104 lines
2.5 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
export CASE_SENSITIVE="true"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# Load colors
autoload -U colors && colors
PROMPT="%{$fg[blue]%}%1~ %{$fg[green]%}>%{$reset_color%} "
# 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
# Use vim keys in tab complete menu:
# bindkey -M menuselect 'h' vi-backward-char
# bindkey -M menuselect 'k' vi-up-line-or-history
# bindkey -M menuselect 'l' vi-forward-char
# bindkey -M menuselect 'j' vi-down-line-or-history
# bindkey -v '^?' backward-delete-char
# 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 cdv () {
if [[ $(uname) == 'Darwin' ]]; then
cd $(pbpaste)
return
fi
cd $(xclip -selection clipboard -o)
}
function cdf () {
cd $(find . -type d -print | fzf)
}
# Load aliases
source ~/.config/aliasrc
export EDITOR=nvim
export GIT_EDITOR=nvim
# Save command history
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=99999999
SAVEHIST=$HISTSIZE
export PATH="~/.local/bin/:$PATH"
if [[ $(uname) == 'Darwin' ]]; then
fi
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"
# FNM variables
export PATH="/run/user/1000/fnm_multishells/20590_1663546026606/bin":$PATH
export FNM_MULTISHELL_PATH="/run/user/1000/fnm_multishells/20590_1663546026606"
export FNM_VERSION_FILE_STRATEGY="local"
export FNM_DIR="/home/tovi/.local/share/fnm"
export FNM_LOGLEVEL="info"
export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist"
export FNM_ARCH="x64"
rehash
# export PHPCS_STANDARD=~/.config/phpcs.xml
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