Files
dotfiles/config/exports
Ismo Vuorinen e5d6cb37fd shell: have, path_(append|prepend|remove)
- have: command -v shorthand
- path_append: appends dir to PATH
- path_prepend: prepends dir to PATH
- path_remove: removes dir from PATH
2023-04-14 00:42:08 +03:00

44 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# shellcheck shell=zsh
# vim: filetype=zsh
export DOTFILES="$HOME/.dotfiles"
source "$DOTFILES/scripts/shared.sh"
path_append "$DOTFILES/local/bin"
# Explicitly set XDG folders
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
# custom variables
export XDG_BIN_HOME="$HOME/.local/bin"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_RUNTIME_DIR="$HOME/.local/run"
# Homebrew configuration
export HOMEBREW="/opt/homebrew"
export HOMEBREW_BIN="$HOMEBREW/bin"
export HOMEBREW_SBIN="$HOMEBREW/sbin"
export HOMEBREW_PKG="$HOMEBREW/opt"
export HOMEBREW_NO_ENV_HINTS=1
path_append "/usr/local/bin"
path_append "$HOMEBREW_SBIN"
path_append "$HOMEBREW_BIN"
path_append "$XDG_BIN_HOME"
# brew, https://brew.sh
have brew && {
path_append "$(brew --prefix python)/bin"
path_append "$(brew --prefix coreutils)/libexec/gnubin"
path_append "$(brew --prefix ruby)/bin"
path_append "$(gem environment gemdir)/bin"
}
source "$DOTFILES/config/exports-shell"
source "$DOTFILES/config/exports-apps"
have nvim && export EDITOR="nvim"