2022-02-10 20:11:56 +01:00
|
|
|
#--------------------------------
|
|
|
|
# filename: /zsh/env
|
|
|
|
#--------------------------------
|
|
|
|
|
2022-02-20 17:38:32 +01:00
|
|
|
# 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
|
|
|
|
|
2022-02-10 20:11:56 +01:00
|
|
|
# set default editor
|
|
|
|
export EDITOR="nano"
|
|
|
|
|
|
|
|
# set `ll` command - b(etter)ls per default
|
|
|
|
alias ll=bls
|
2022-02-20 17:39:39 +01:00
|
|
|
if test -f "$homebrew_path/exa"; then
|
2022-02-10 20:11:56 +01:00
|
|
|
alias ll=exa
|
|
|
|
fi
|
2022-02-20 17:39:39 +01:00
|
|
|
if test -f "$homebrew_path/lsd"; then
|
2022-02-10 20:11:56 +01:00
|
|
|
alias ll=lsd
|
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# Path additions
|
|
|
|
#
|
|
|
|
|
|
|
|
if test -d "/opt/homebrew/"; then
|
2022-02-20 17:40:01 +01:00
|
|
|
export PATH="/opt/homebrew/bin:$PATH"
|
2022-02-10 20:11:56 +01:00
|
|
|
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
|
|
|
|
|
2022-02-20 17:39:39 +01:00
|
|
|
if test -d "$homebrew_opt/openjdk/bin/"; then
|
|
|
|
export PATH="$homebrew_opt/openjdk/bin:$PATH"
|
2022-02-20 16:36:35 +01:00
|
|
|
fi
|
|
|
|
|
2022-05-02 09:43:14 +02:00
|
|
|
if test -d "$homebrew_opt/php@7.4"; then
|
|
|
|
export PATH="$homebrew_opt/php@7.4/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
2022-02-20 17:39:39 +01:00
|
|
|
if test -d "$homebrew_opt/ruby"; then
|
|
|
|
export PATH="$homebrew_opt/ruby/bin:$PATH"
|
2022-02-10 20:11:56 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -d "/usr/local/sbin"; then
|
2022-02-20 17:40:01 +01:00
|
|
|
export PATH="/usr/local/sbin:$PATH"
|
2022-02-10 20:11:56 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
|
|
|
# evals
|
|
|
|
#
|
|
|
|
|
|
|
|
# TheFuck
|
2022-11-13 19:19:00 +01:00
|
|
|
if [[ -x $(which thefuck) ]]; then
|
2022-02-10 20:11:56 +01:00
|
|
|
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'
|
2022-02-20 16:36:35 +01:00
|
|
|
fi
|