Browse Source

Improvements to the README (#377)

remotes/origin/add-with-shims
Waldir Pimenta 4 years ago committed by GitHub
parent
commit
e7dc3c8799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .ci/install.sh
  2. 4
      .github/workflows/rust.yml
  3. 38
      README.md

2
.ci/install.sh

@ -56,7 +56,7 @@ set_filename() { @@ -56,7 +56,7 @@ set_filename() {
FILENAME="fnm-macos"
USE_HOMEBREW="false"
echo "Downloading the latest fnm binary from GitHub..."
echo " Pro tip: it's eaiser to use Homebrew for managing fnm in MacOS."
echo " Pro tip: it's eaiser to use Homebrew for managing fnm in macOS."
echo " Remove the \`--force-no-brew\` so it will be easy to upgrade."
elif [ "$OS" == "Darwin" ]; then
USE_HOMEBREW="true"

4
.github/workflows/rust.yml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
name: Rust
on:
on:
pull_request:
push:
branches:
@ -68,7 +68,7 @@ jobs: @@ -68,7 +68,7 @@ jobs:
build_macos_release:
runs-on: macOS-latest
name: "Release build for MacOS"
name: "Release build for macOS"
steps:
- uses: hecrj/setup-rust-action@v1
with:

38
README.md

@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
## Features
:earth_americas: Cross-platform support (Mac, Windows, Linux)
:earth_americas: Cross-platform support (macOS, Windows, Linux)
:sparkles: Single file, easy installation, instant startup
@ -22,17 +22,17 @@ @@ -22,17 +22,17 @@
## Installation
### Using a script (MacOS/Linux)
### Using a script (macOS/Linux)
For `bash`, `zsh` and `fish` shells, there's an [automatic installation script](./.ci/install.sh):
```bash
```sh
curl -fsSL https://fnm.vercel.app/install | bash
```
#### Upgrade
On OSX, it is a simple as `brew upgrade fnm`.
On macOS, it is as simple as `brew upgrade fnm`.
On other operating systems, upgrading `fnm` is almost the same as installing it. To prevent duplication in your shell config file add `--skip-shell` to install command.
@ -48,19 +48,19 @@ Skip appending shell specific loader to shell config file, based on the current @@ -48,19 +48,19 @@ Skip appending shell specific loader to shell config file, based on the current
`--force-install`
MacOS installations using the installation script are deprecated in favor of the Homebrew formula, but this forces the script to install using it anyway.
macOS installations using the installation script are deprecated in favor of the Homebrew formula, but this forces the script to install using it anyway.
Example:
```bash
```sh
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir "./.fnm" --skip-shell
```
### Manually
#### Using Homebrew (OSX)
#### Using Homebrew (macOS/Linux)
```bash
```sh
brew install fnm
```
@ -68,21 +68,21 @@ Then, [set up your shell for fnm](#shell-setup) @@ -68,21 +68,21 @@ Then, [set up your shell for fnm](#shell-setup)
#### Using Scoop (Windows)
```bash
```sh
scoop install fnm
```
Then, [set up your shell for fnm](#shell-setup)
#### Using Cargo (Linux/Mac/Windows)
#### Using Cargo (Linux/macOS/Windows)
```bash
```sh
cargo install fnm
```
Then, [set up your shell for fnm](#shell-setup)
#### Using a release binary (Linux/Mac/Windows)
#### Using a release binary (Linux/macOS/Windows)
- Download the [latest release binary](https://github.com/Schniz/fnm/releases) for your system
- Make it available globally on `PATH` environment variable
@ -92,7 +92,7 @@ Then, [set up your shell for fnm](#shell-setup) @@ -92,7 +92,7 @@ Then, [set up your shell for fnm](#shell-setup)
fnm ships its completions with the binary:
```
```sh
fnm completions --shell <SHELL>
```
@ -143,13 +143,13 @@ fnm env --use-on-cd | Out-String | Invoke-Expression @@ -143,13 +143,13 @@ fnm env --use-on-cd | Out-String | Invoke-Expression
```
- On Windows, the profile is located at `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`
- For Mac/Linux, the profile is located at `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
- For macOS/Linux, the profile is located at `~/.config/powershell/Microsoft.PowerShell_profile.ps1`
#### Windows Command Prompt aka Batch aka WinCMD
fnm is also supported but is not entirely covered. [You can set up a startup script](https://superuser.com/a/144348) and append the following line:
```
```batch
FOR /f "tokens=*" %i IN ('fnm env --use-on-cd') DO CALL %i
```
@ -157,7 +157,7 @@ FOR /f "tokens=*" %i IN ('fnm env --use-on-cd') DO CALL %i @@ -157,7 +157,7 @@ FOR /f "tokens=*" %i IN ('fnm env --use-on-cd') DO CALL %i
### Global Options
```
```sh
fnm [--shell=fish|bash|zsh] [--node-dist-mirror=URI] [--fnm-dir=DIR] [--log-level=quiet|error|info] <command>
```
@ -221,7 +221,7 @@ PRs welcome :tada: @@ -221,7 +221,7 @@ PRs welcome :tada:
### Developing:
```
```sh
# Install Rust
git clone https://github.com/Schniz/fnm.git
cd fnm/
@ -230,12 +230,12 @@ cargo build @@ -230,12 +230,12 @@ cargo build
### Running Binary:
```
```sh
cargo run -- --help # Will behave like `fnm --help`
```
### Running Tests:
```
```sh
cargo test
```

Loading…
Cancel
Save