Browse Source

Use separate config file for fish config (#266)

* Use separate config file for fish config

* Update installation test for new fish config location

* Update README for new fish config location

* Fix misspelling of conf.d in README

Co-authored-by: James Chen-Smith <15643597+jameschensmith@users.noreply.github.com>

Co-authored-by: James Chen-Smith <15643597+jameschensmith@users.noreply.github.com>
remotes/origin/add-with-shims
Wes Baker 4 years ago committed by GitHub
parent
commit
136ea03080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .ci/get_shell_profile.sh
  2. 3
      .ci/install.sh
  3. 5
      README.md

2
.ci/get_shell_profile.sh

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
case $1 in
"fish")
echo "$HOME/.config/fish/config.fish"
echo "$HOME/.config/fish/conf.d/fnm.fish"
;;
"zsh")
echo "$HOME/.zshrc"

3
.ci/install.sh

@ -152,7 +152,7 @@ setup_shell() { @@ -152,7 +152,7 @@ setup_shell() {
echo 'eval "`fnm env --multi`"' >>$CONF_FILE
elif [ "$CURRENT_SHELL" == "fish" ]; then
CONF_FILE=$HOME/.config/fish/config.fish
CONF_FILE=$HOME/.config/fish/conf.d/fnm.fish
ensure_containing_dir_exists "$CONF_FILE"
echo "Installing for Fish. Appending the following to $CONF_FILE:"
echo ""
@ -160,7 +160,6 @@ setup_shell() { @@ -160,7 +160,6 @@ setup_shell() {
echo ' set PATH '"$INSTALL_DIR"' $PATH'
echo ' fnm env --multi | source'
echo '' >>$CONF_FILE
echo '# fnm' >>$CONF_FILE
echo 'set PATH '"$INSTALL_DIR"' $PATH' >>$CONF_FILE
echo 'fnm env --multi | source' >>$CONF_FILE

5
README.md

@ -42,7 +42,7 @@ Set a custom directory for fnm to be installed. The default is `$HOME/.fnm`. @@ -42,7 +42,7 @@ Set a custom directory for fnm to be installed. The default is `$HOME/.fnm`.
`--skip-shell`
Skip appending shell specific loader to shell config file, based on the current user shell, defined in `$SHELL`. e.g. for Bash, `$HOME/.bashrc`. `$HOME/.zshrc` for Zsh. For Fish - `$HOME/.config/fish/config.fish`
Skip appending shell specific loader to shell config file, based on the current user shell, defined in `$SHELL`. e.g. for Bash, `$HOME/.bashrc`. `$HOME/.zshrc` for Zsh. For Fish - `$HOME/.config/fish/conf.d/fnm.fish`
`--force-install`
@ -76,11 +76,12 @@ Then apply the changes the installer prints, to set up your shell profile. @@ -76,11 +76,12 @@ Then apply the changes the installer prints, to set up your shell profile.
eval "$(fnm env --multi)"
```
If you are using [fish shell](https://fishshell.com/), add this line to your `config.fish` file:
If you are using [fish shell](https://fishshell.com/), create `~/.config/fish/conf.d/fnm.fish` add this line to it:
```fish
fnm env --multi | source
```
## Completions
- Fish Shell

Loading…
Cancel
Save