Context
Continuing the conversation from (fourteenth racketcon)
about releases and managing Racket versions:
When I install a new Racket version, I do the following:
-
brew upgrade --cask racket
(afterbrew update
) -
raco pkg migrate <old-version>
-
I then use tmux to send the following commands to all my open shells:
pathrm ~/Library/Racket/<old>/bin pathrm man ~/Library/Racket/<old>/man pathadd ~/Library/Racket/<new>/bin pathadd man ~/Library/Racket/<new>/man
It is not uncommon for me to have ~20 open shells for ~10 different projects (not all Racket) in a tmux server.
(Here's a tmux key-binding for sending a command to all panes, and here are my shell definitions of pathadd
and pathrm
for Zsh. I have similar commands for Bash in that repo, though they're kludgier and I won't link them.)
These paths come from setupdirs
with find-user-console-bin-dir
and find-user-man-dir
so that I have them on PATH, for example to have launchers available from user-scope installed packages.
The tmux part of this process requires making sure none of my tmux panes have a program running that isn't the shell, and can still break when a shell is in Normal mode (I use bindkey -v
in Zsh similar to set -o vi
in Bash). New shells automatically get the right paths.
I've looked at /etc/paths.d
, but I think that only works for new shells, and I already have a solution for that.
Question
Is there a better way for me to manage these path updates for user directories?
Having a single place to point to ("current") would be nice and would probably fit with the "build racketup
on top of raco cross
." In the meantime, what do others do? Is there a workflow option I'm missing?