diff --git a/README.md b/README.md index 71d9d16..d3970b9 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ The script is re-runnable: each run re-backs up to `~/Oldconfig` (overwriting th ### CLI scripts (`bin/`) -Deployed to `~/.local/bin` (must be on `PATH` — `pipx ensurepath` adds it): +Deployed to `~/.local/bin` (the deployed bashrc adds this dir to `PATH`): - **`dt`** — manage claude-in-dtach sessions (`dt ls|at|kill`). Needs `dtach` + `fzf`. - **`dtach-router`** — source from `~/.bashrc` to get a session dashboard on SSH login. Needs `dt`, `dtach`, `fzf`. diff --git a/bash/bashrc-linux b/bash/bashrc-linux index 5e563ff..ea4f1b9 100644 --- a/bash/bashrc-linux +++ b/bash/bashrc-linux @@ -7,6 +7,12 @@ alias grep='grep --color=auto' # colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +# Ensure ~/.local/bin is on PATH (pipx CLIs + personal scripts from bin/) +case ":$PATH:" in + *":$HOME/.local/bin:"*) ;; + *) export PATH="$HOME/.local/bin:$PATH" ;; +esac + # Set history size to unlimited if [[ $EUID == 0 ]] ; then export HISTSIZE=0 diff --git a/bash/bashrc-osx b/bash/bashrc-osx index e613dd8..892362c 100644 --- a/bash/bashrc-osx +++ b/bash/bashrc-osx @@ -18,6 +18,12 @@ alias clean='sh ~/.script/clean.sh' # colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' +# Ensure ~/.local/bin is on PATH (pipx CLIs + personal scripts from bin/) +case ":$PATH:" in + *":$HOME/.local/bin:"*) ;; + *) export PATH="$HOME/.local/bin:$PATH" ;; +esac + # Used for vim header export VIUSER=xuser export VIMAIL=xuser@student.42.fr diff --git a/install.sh b/install.sh index 7f69df7..fe862da 100755 --- a/install.sh +++ b/install.sh @@ -99,4 +99,4 @@ chmod +x "$HOME"/.local/bin/dt "$HOME"/.local/bin/dtach-router "$HOME"/.local/bi echo "Done. Restart your shell or run: source ~/.bashrc" echo "If you use zsh, switch to bash to enjoy these settings =)" -echo "Note: ~/.local/bin must be on PATH (pipx ensurepath handles it; re-login if needed)." +echo "Note: the deployed bashrc puts ~/.local/bin on PATH — re-login or run: source ~/.bashrc"