snippets/old_snippets/auto-nvm-use.en.md

19 lines
391 B
Markdown

---
title: "auto nvm use"
seo_description: Configuration to automatically run when starting a shell session in a dir with an .nvmrc file
date: 2023-03-13T10:33:12+01:00
draft: false
snippet_types:
- nvm
---
Simply adding:
```
[ -f ./.nvmrc ] && nvm use
```
to your .bashrc or .zshrc
Will automatically run the `nvm use` command should you start the shell in a dir with a `.nvmrc` file.