mirror of
https://github.com/JanJastrow/.dotfiles.git
synced 2024-12-22 23:11:54 +01:00
92 lines
2.1 KiB
Plaintext
92 lines
2.1 KiB
Plaintext
#--------------------------------
|
|
# filename: /zsh/env
|
|
#--------------------------------
|
|
|
|
# set language
|
|
export LANGUAGE=en_US.UTF-8
|
|
export LC_ALL=en_US.UTF-8
|
|
export LANG=en_US.UTF-8
|
|
export LC_TYPE=en_US.UTF-8
|
|
|
|
# set default editor
|
|
export EDITOR="nano"
|
|
|
|
# set `ll` command - b(etter)ls per default
|
|
alias ll=bls
|
|
if [[ -x `which /usr/local/bin/exa` || -x `which /opt/homebrew/bin/exa` ]]; then
|
|
alias ll=exa
|
|
fi
|
|
if [[ -x `which /usr/local/bin/lsd` || -x `which /opt/homebrew/bin/lsd` ]]; then
|
|
alias ll=lsd
|
|
fi
|
|
|
|
#
|
|
# Path additions
|
|
#
|
|
|
|
if test -d "/opt/homebrew/"; then
|
|
export PATH="/opt/homebrew/bin/:$PATH"
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
fi
|
|
|
|
if test -d "$HOME/go"; then
|
|
export PATH="$HOME/go/bin:$PATH"
|
|
fi
|
|
|
|
if test -d "$HOME/.rbenv"; then
|
|
export PATH="$HOME/.rbenv/bin:$PATH"
|
|
eval "$(rbenv init -)"
|
|
fi
|
|
|
|
if test -d "$HOME/.cargo"; then
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
eval "$(rbenv init -)"
|
|
fi
|
|
|
|
if test -d "$HOME/.local"; then
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
fi
|
|
|
|
# Add syncthing synced binary folder to $PATH
|
|
if [[ $platform == 'macOS' ]]; then
|
|
if [[ $arch == 'arm' ]]; then
|
|
export PATH="$HOME/SyncMac/Apps/bin/arm64:$PATH"
|
|
export PATH="$HOME/SyncMac/Apps/bin/universal:$PATH"
|
|
export PATH="$HOME/SyncMac/Apps/bin/x86_64_rosetta2:$PATH"
|
|
elif [[ $arch == 'i386' ]]; then
|
|
export PATH="$HOME/SyncMac/Apps/bin/universal:$PATH"
|
|
export PATH="$HOME/SyncMac/Apps/bin/x86_64:$PATH"
|
|
export PATH="$HOME/SyncMac/Apps/bin/x86_64_rosetta2:$PATH"
|
|
fi
|
|
fi
|
|
|
|
if test -d "/opt/homebrew/opt/openjdk/bin"; then
|
|
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
|
|
fi
|
|
if test -d "/usr/local/opt/java/bin/"; then
|
|
export PATH="/usr/local/opt/java/bin/:$PATH"
|
|
fi
|
|
|
|
/usr/local/opt/java/bin/
|
|
|
|
if test -d "/usr/local/opt/ruby"; then
|
|
export PATH="/usr/local/opt/ruby/bin:$PATH"
|
|
fi
|
|
|
|
if test -d "/usr/local/sbin"; then
|
|
export PATH="/usr/local/sbin:$PATH"
|
|
fi
|
|
|
|
#
|
|
# evals
|
|
#
|
|
|
|
# TheFuck
|
|
if [[ -x `which thefuck` ]]; then
|
|
eval "$(thefuck --alias)"
|
|
# You can use whatever you want as an alias, like for Mondays:
|
|
eval "$(thefuck --alias FUCK)"
|
|
|
|
alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
|
|
fi
|