Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases and multishell support #30

Merged
merged 16 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .ci/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

GIT_ROOT=$(git rev-parse --show-toplevel)

if [ "$GIT_ROOT" == "" ]; then
echo "Git root cannot be empty"
exit 1
fi

rm -f $GIT_ROOT/.git/hooks/pre-commit &> /dev/null
ln -s $GIT_ROOT/.ci/pre-commit-hook $GIT_ROOT/.git/hooks/pre-commit
5 changes: 5 additions & 0 deletions .ci/pre-commit-hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

set -e

npx lint-staged
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</div>

## Features

:sparkles: Single file, easy installation

:rocket: Built with speed in mind
Expand All @@ -29,9 +30,9 @@ curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash

### Manually

* Download the [latest release binary](https://github.com/Schniz/fnm/releases) for your system
* Make it available globally on `$PATH`
* Add the following line to your `.bashrc`/`.zshrc` file:
- Download the [latest release binary](https://github.com/Schniz/fnm/releases) for your system
- Make it available globally on `$PATH`
- Add the following line to your `.bashrc`/`.zshrc` file:

```bash
eval `fnm env`
Expand Down Expand Up @@ -63,11 +64,15 @@ Lists the installed Node versions.

Lists the Node versions available to download remotely.

### `fnm env [--fish]`
### `fnm env [--multi] [--fish]`

Prints the required shell commands in order to configure your shell, Bash compliant by default.

Prints the required shell commands in order to configure your shell, Bash compliant by default. Provide `--fish` to output the Fish-compliant version.
- Providing `--multi` will output the multishell support, allowing a different current Node version per shell
- Providing `--fish` will output the Fish-compliant version.

## Future Plans

- [ ] Feature: make versions complete the latest: `10` would infer the latest minor and patch versions of node 10. `10.1` would infer the latest patch version of node 10.1
- [ ] Feature: `fnm use --install`, `fnm use --quiet`
- [ ] Feature: `fnm install lts`?
Expand All @@ -88,6 +93,7 @@ PRs welcome :tada:
npm install -g esy
git clone https://github.com/Schniz/fnm.git
esy install
esy bootstrap
esy build
```

Expand Down
Loading