From e6c42d36ae22f786906cbaac7a3f1ff33a1e18ff Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 7 Jan 2026 16:06:59 +0000 Subject: [PATCH] [shell-common] Reorganise exports --- .../.config/shell-common/01_exports.sh | 18 +----------------- shell-common/.config/shell-common/99_go.sh | 7 +++++++ shell-common/.config/shell-common/99_python.sh | 2 ++ shell-common/.config/shell-common/99_rust.sh | 4 ++++ 4 files changed, 14 insertions(+), 17 deletions(-) create mode 100644 shell-common/.config/shell-common/99_go.sh create mode 100644 shell-common/.config/shell-common/99_python.sh create mode 100644 shell-common/.config/shell-common/99_rust.sh diff --git a/shell-common/.config/shell-common/01_exports.sh b/shell-common/.config/shell-common/01_exports.sh index ad78062..2dab7eb 100644 --- a/shell-common/.config/shell-common/01_exports.sh +++ b/shell-common/.config/shell-common/01_exports.sh @@ -1,7 +1,7 @@ # shellcheck shell=bash -# User specific environment # XDG Base Directories +# Empty variables would be set to defaults, but we define them explicitly export XDG_BIN_HOME="$HOME/.local/bin" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" @@ -26,22 +26,6 @@ for editor in "${editor_preferences[@]}"; do fi done -# Go stuff -export GOPATH=$XDG_DATA_HOME/go/ -export PATH=${GOPATH}bin:$PATH -if [ -z ${GOROOT+x} ] && [ -d /usr/local/go ]; then - export GOROOT=/usr/local/go/ - export PATH=$PATH:$GOROOT/bin -fi - -# Python stuff -export POETRY_VIRTUALENVS_IN_PROJECT=true - -# Rust stuff -if [ -f $HOME/.cargo/env ]; then - source $HOME/.cargo/env -fi - # https://github.com/oz/tz if [ -x "$(command -v tz)" ]; then export TZ_LIST="Europe/Dublin,Portwest HQ;America/New_York,WDW;America/Los_Angeles,DLR;Europe/Paris,DLP" diff --git a/shell-common/.config/shell-common/99_go.sh b/shell-common/.config/shell-common/99_go.sh new file mode 100644 index 0000000..33bb76b --- /dev/null +++ b/shell-common/.config/shell-common/99_go.sh @@ -0,0 +1,7 @@ +# Go stuff +export GOPATH=$XDG_DATA_HOME/go/ +export PATH=${GOPATH}bin:$PATH +if [ -z ${GOROOT+x} ] && [ -d /usr/local/go ]; then + export GOROOT=/usr/local/go/ + export PATH=$PATH:$GOROOT/bin +fi diff --git a/shell-common/.config/shell-common/99_python.sh b/shell-common/.config/shell-common/99_python.sh new file mode 100644 index 0000000..999cebb --- /dev/null +++ b/shell-common/.config/shell-common/99_python.sh @@ -0,0 +1,2 @@ +# Python stuff +export POETRY_VIRTUALENVS_IN_PROJECT=true diff --git a/shell-common/.config/shell-common/99_rust.sh b/shell-common/.config/shell-common/99_rust.sh new file mode 100644 index 0000000..08e7e87 --- /dev/null +++ b/shell-common/.config/shell-common/99_rust.sh @@ -0,0 +1,4 @@ +# Rust stuff +if [ -f $HOME/.cargo/env ]; then + source $HOME/.cargo/env +fi