v1.7.0

Schniz/fnmv1.7.0Mar 5, 2019by Schniz

AI Summary

This release introduces the `--use-on-cd` feature, allowing the tool to automatically switch Node versions based on `.nvmrc` or `.node-version` files in the current directory.

Key Highlights

  • New `--use-on-cd` option for automatic version switching
  • Support for `.nvmrc` and `.node-version` files
  • Requires configuration updates for Bash, Zsh, and Fish shells

New Features

  • Automatic version switching based on directory files
  • Automatic shell inference

Full Release Notes

## Highlight 🔦 

There's a new `--use-on-cd` option to `fnm env` that will change Node versions automatically based on the current working directory `.nvmrc` or `.node-version`.

If you already have `fnm` installed,

* and you use bash/zsh, you will need to change your `.zshrc`, `.bashrc` or `.bash_profile`:
  ```diff
  - eval `fnm env --multi`
  + eval "`fnm env --multi --use-on-cd`"
  ```
* and you have fish, you will need to change your `fish.config` to the following:
  ```diff
  - eval (fnm env --multi)
  + fnm env --multi --use-on-cd | source
  ```

## Changelog

#### New Feature 🎉

- [#68](https://github.com/Schniz/fnm/pull/68) Infer shells automatically, and `use` versions based on the current working directory (optional) ([@Schniz](https://github.com/Schniz))