diff --git a/README.md b/README.md index 7aebe0f..f427e77 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/). For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter). -_1742 TILs and counting..._ +_1743 TILs and counting..._ See some of the other learning resources I work on: @@ -759,6 +759,7 @@ If you've learned something here, support my efforts writing daily TILs by - [Preserve Color Output For Task Command](mise/preserve-color-output-for-task-command.md) - [Read Existing Dot Env File Into Env Vars](mise/read-existing-dot-env-file-into-env-vars.md) - [Run A Command With Specific Tool Version](mise/run-a-command-with-specific-tool-version.md) +- [Search Through Bin Paths For Tool Locations](mise/search-through-bin-paths-for-tool-locations.md) ### MongoDB diff --git a/mise/search-through-bin-paths-for-tool-locations.md b/mise/search-through-bin-paths-for-tool-locations.md new file mode 100644 index 0000000..171329e --- /dev/null +++ b/mise/search-through-bin-paths-for-tool-locations.md @@ -0,0 +1,29 @@ +# Search Through Bin Paths For Tool Locations + +The `mise bin-paths` command will list all the bin paths that are managed by +`mise`. When you tell `mise` to install a tool, it installs a specific version +at a location where its binaries can be made accessible on the system path. + +While `mise ls` is useful for seeing what is installed by `mise` and at what +version, the `bin-paths` command can tell you where those tool installations +with their binaries are located. + +Combine this with `grep` or `rg` to narrow down the results to tools by a +specific name: + +```bash +❯ mise bin-paths | rg 'neovim' +/Users/lastword/.local/share/mise/installs/npm-neovim/5.4.0/bin +/Users/lastword/.local/share/mise/installs/pipx-neovim-remote/2.5.1/bin +/Users/lastword/.local/share/mise/installs/neovim/0.11.6/bin +``` + +I can then look in one of these directories to see the one or more binaries that +they include. For instance, here is what is in the `node` bin path: + +```bash +❯ ls /Users/lastword/.local/share/mise/installs/node/22.22.0/bin + ./  ../  claude@  corepack@  node*  npm*  npx@ +``` + +See `mise bin-paths --help` for more details.