Skip to content

Commit

Permalink
Switch to using init in README
Browse files Browse the repository at this point in the history
  • Loading branch information
b3nj5m1n committed Jan 18, 2021
1 parent bda9c4d commit 23ea43b
Showing 1 changed file with 16 additions and 41 deletions.
57 changes: 16 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,18 @@ When suggesting a command, McFly takes into consideration:

Bash:
```bash
if [[ -r "/usr/local/opt/mcfly/mcfly.bash" ]]; then

This comment has been minimized.

Copy link
@varenc

varenc Oct 13, 2021

Contributor

When the readme was updated to use mcfly init ..., the above line mentioning

changing /usr/local to your brew --prefix if needed

is no longer needed and no longer makes sense in this context.

source "/usr/local/opt/mcfly/mcfly.bash"
fi
eval "$(mcfly init bash)"
```

Zsh:
```bash
if [[ -r "/usr/local/opt/mcfly/mcfly.zsh" ]]; then
source "/usr/local/opt/mcfly/mcfly.zsh"
fi
eval "$(mcfly init zsh)"
```

Fish:
```bash
if test -r "/usr/local/opt/mcfly/mcfly.fish"
source "/usr/local/opt/mcfly/mcfly.fish"
mcfly_key_bindings
end
mcfly init fish | source
mcfly_key_bindings
```
1. Run `. ~/.bashrc` / `. ~/.zshrc` / `source ~/.config/fish/config.fish` or restart your terminal emulator.

Expand Down Expand Up @@ -98,24 +92,18 @@ When suggesting a command, McFly takes into consideration:

Bash:
```bash
if [[ -r "/opt/local/share/mcfly/mcfly.bash" ]]; then
source "/opt/local/share/mcfly/mcfly.bash"
fi
eval "$(mcfly init bash)"
```

Zsh:
```bash
if [[ -r "/opt/local/share/mcfly/mcfly.zsh" ]]; then
source "/opt/local/share/mcfly/mcfly.zsh"
fi
eval "$(mcfly init zsh)"
```

Fish:
```bash
if test -r "/opt/local/share/mcfly/mcfly.fish"
source "/opt/local/share/mcfly/mcfly.fish"
mcfly_key_bindings
end
mcfly init fish | source
mcfly_key_bindings
```
1. Run `. ~/.bashrc` / `. ~/.zshrc` / `source ~/.config/fish/config.fish` or restart your terminal emulator.

Expand All @@ -131,29 +119,22 @@ When suggesting a command, McFly takes into consideration:

1. Download the [latest release from GitHub](https://github.com/cantino/mcfly/releases).
1. Install to a location in your `$PATH`. (For example, you could create a directory at `~/bin`, copy `mcfly` to this location, and add `export PATH="$PATH:$HOME/bin"` to your `.bashrc` / `.zshrc`, or run `set -Ua fish_user_paths "$HOME/bin"` for fish.)
1. Copy `mcfly.bash`, `mcfly.zsh`, or `mcfly.fish` to a known location.
1. Add the following to the end of your `~/.bashrc`, `~/.zshrc`, or `~/.config/fish/config.fish` file, respectively:

Bash:
```bash
if [[ -r /path/to/mcfly.bash ]]; then
source /path/to/mcfly.bash
fi
eval "$(mcfly init bash)"
```

Zsh:
```bash
if [[ -r /path/to/mcfly.zsh ]]; then
source /path/to/mcfly.zsh
fi
eval "$(mcfly init zsh)"
```

Fish:
```bash
if test -r /path/to/mcfly.fish
source /path/to/mcfly.fish
mcfly_key_bindings
end
mcfly init fish | source
mcfly_key_bindings
```
1. Run `. ~/.bashrc` / `. ~/.zshrc` / `source ~/.config/fish/config.fish` or restart your terminal emulator.

Expand All @@ -167,24 +148,18 @@ When suggesting a command, McFly takes into consideration:

Bash:
```bash
if [[ -r /path/to/mcfly.bash ]]; then
source /path/to/mcfly.bash
fi
eval "$(mcfly init bash)"
```

Zsh:
```bash
if [[ -r /path/to/mcfly.zsh ]]; then
source /path/to/mcfly.zsh
fi
eval "$(mcfly init zsh)"
```

Fish:
```bash
if test -r /path/to/mcfly.fish
source /path/to/mcfly.fish
mcfly_key_bindings
end
mcfly init fish | source
mcfly_key_bindings
```
1. Run `. ~/.bashrc` / `. ~/.zshrc` / `source ~/.config/fish/config.fish` or restart your terminal emulator.

Expand Down

0 comments on commit 23ea43b

Please sign in to comment.