From 16cde7955385419b734fb3425ecc14da1769b3ce Mon Sep 17 00:00:00 2001 From: Max Jacobson Date: Tue, 23 Jun 2026 12:47:57 -0400 Subject: [PATCH] Use asdf over fnm + rbenv an experiment... --- Brewfile | 5 +++-- asdfrc | 1 + config/fish/conf.d/fnm.fish | 3 ++- config/fish/conf.d/rbenv.fish | 3 ++- config/fish/config.fish | 16 ++++++++++++++++ 5 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 asdfrc diff --git a/Brewfile b/Brewfile index a2f4e07..498c994 100644 --- a/Brewfile +++ b/Brewfile @@ -9,6 +9,7 @@ cask "1password-cli" tap "atlassian/homebrew-acli", trusted: true brew "acli" # atlassian CLI +brew "asfd" # generic tool version manager brew "awscli" brew "bat" # cat but with syntax highlighting brew "btop" # top/htop alternatiave @@ -17,7 +18,7 @@ brew "coreutils" # installs gdircolors and others brew "eza" # modern ls brew "fd" # find replacement brew "fish" # My main shell; need to add it to `/etc/shells` then run `chsh -s /opt/homebrew/bin/fish` -brew "fnm" # fast node.js manager +# brew "fnm" # fast node.js manager brew "fzf" brew "gh" # New GitHub CLI, via https://github.com/cli/cli brew "git" # version control @@ -37,7 +38,7 @@ brew "msedit" # simple text editor from Microsoft to use every now and then brew "neovim" # finally made the leap from regular old vim brew "ncdu" # upgrade over du, helps you figure out where your disk space is going brew "postgresql@18", restart_service: true, link: true, conflicts_with: ["postgresql"] # a database I sometimes use -brew "rbenv" # managing ruby versions +# brew "rbenv" # managing ruby versions brew "rcm" # tool to manage dotfiles repository brew "redis", restart_service: true # a database I sometimes use brew "ripgrep" # grep replacement, exposes rg CLI diff --git a/asdfrc b/asdfrc new file mode 100644 index 0000000..e600bd0 --- /dev/null +++ b/asdfrc @@ -0,0 +1 @@ +legacy_version_file = yes diff --git a/config/fish/conf.d/fnm.fish b/config/fish/conf.d/fnm.fish index c71582e..13f968c 100644 --- a/config/fish/conf.d/fnm.fish +++ b/config/fish/conf.d/fnm.fish @@ -1,4 +1,5 @@ # Fast node manager # https://github.com/Schniz/fnm -fnm env --use-on-cd --shell fish --log-level quiet | source +# Temporarily evaluating asdf instead of fnm +# fnm env --use-on-cd --shell fish --log-level quiet | source diff --git a/config/fish/conf.d/rbenv.fish b/config/fish/conf.d/rbenv.fish index b3a8982..cf00d89 100644 --- a/config/fish/conf.d/rbenv.fish +++ b/config/fish/conf.d/rbenv.fish @@ -3,4 +3,5 @@ set --global --export RBENV_ROOT "$HOME/.cache/rbenv" # Enables rbenv for this shell session # install rbenv with `brew install rbenv` -eval "$(rbenv init - fish)" +# Temporarily evaluating asdf instead of rbenv +# eval "$(rbenv init - fish)" diff --git a/config/fish/config.fish b/config/fish/config.fish index e325c40..2b3dbd4 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -1,3 +1,19 @@ +# ASDF configuration code +if test -z $ASDF_DATA_DIR + set _asdf_shims "$HOME/.asdf/shims" +else + set _asdf_shims "$ASDF_DATA_DIR/shims" +end + +# Do not use fish_add_path (added in Fish 3.2) because it +# potentially changes the order of items in PATH +if not contains $_asdf_shims $PATH + set -gx --prepend PATH $_asdf_shims +end +set --erase _asdf_shims + +set --global --export ASDF_NODEJS_AUTO_ENABLE_COREPACK 1 + if status is-interactive # Setting the greeting to an empty list so fish doesn't display the default one # Can be restored like so: