Create ~/Work with ./bin in the path for contained projects

This commit is contained in:
Ryan Hughes
2025-09-13 13:13:09 -04:00
parent beb2e6b865
commit 1878ea4d99
3 changed files with 24 additions and 1 deletions

View File

@@ -10,5 +10,5 @@ if [[ ! -v BASH_COMPLETION_VERSINFO && -f /usr/share/bash-completion/bash_comple
fi
# Set complete path
export PATH="./bin:$HOME/.local/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
set +h

View File

@@ -24,3 +24,13 @@ if [[ $(uname -m) == "x86_64" ]]; then
mise use --global "ruby@${RUBY_VERSION}"
fi
# Add ./bin to path for all items in ~/Work
mkdir -p "$HOME/Work"
cat >"$HOME/Work/.mise.toml" <<'EOF'
[env]
_.path = "{{ cwd }}/bin"
EOF
mise trust ~/Work/.mise.toml

13
migrations/1757783204.sh Normal file
View File

@@ -0,0 +1,13 @@
echo "Create ~/Work with ./bin in the path for contained projects"
mkdir -p "$HOME/Work"
if [ -f "$HOME/Work/.mise.toml" ]; then
cp "$HOME/Work/.mise.toml" "$HOME/Work/.mise.toml.bak.$(date +%s)"
fi
cat >"$HOME/Work/.mise.toml" <<'EOF'
[env]
_.path = "{{ cwd }}/bin"
EOF
mise trust ~/Work/.mise.toml