McFly replaces your default ctrl-r
shell history search with an intelligent search engine that takes into account
your working directory and the context of recently executed commands. McFly's suggestions are prioritized
in real time with a small neural network.
TL;DR: an upgraded ctrl-r
where history results make sense for what you're working on right now.
ctrl-r
to bring up a full-screen reverse history search prioritized with a small neural network.The key feature of McFly is smart command prioritization powered by a small neural network that runs in real time. The goal is for the command you want to run to always be one of the top suggestions.
When suggesting a command, McFly takes into consideration:
bash
brew tap cantino/mcfly https://github.com/cantino/mcfly
mcfly
:
bash
brew install mcfly
Add the following to the end of your ~/.bashrc
, ~/.zshrc
, or ~/.config/fish/config.fish
file, as appropriate, changing /usr/local
to your brew --prefix
if needed:
Bash:
bash
if [[ -r "/usr/local/opt/mcfly/mcfly.bash" ]]; then
source "/usr/local/opt/mcfly/mcfly.bash"
fi
Zsh:
bash
if [[ -r "/usr/local/opt/mcfly/mcfly.zsh" ]]; then
source "/usr/local/opt/mcfly/mcfly.zsh"
fi
Fish:
bash
if test -r "/usr/local/opt/mcfly/mcfly.fish"
source "/usr/local/opt/mcfly/mcfly.fish"
mcfly_key_bindings
end
. ~/.bashrc
/ . ~/.zshrc
/ source ~/.config/fish/config.fish
or restart your terminal emulator.mcfly
:
bash
brew uninstall mcfly
bash
brew untap cantino/mcfly
~/.bashrc
/ ~/.zshrc
/ ~/.config/fish/config.fish
.$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.)mcfly.bash
, mcfly.zsh
, or mcfly.fish
to a known location.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
Zsh:
bash
if [[ -r /path/to/mcfly.zsh ]]; then
source /path/to/mcfly.zsh
fi
Fish:
bash
if test -r /path/to/mcfly.fish
source /path/to/mcfly.fish
mcfly_key_bindings
end
. ~/.bashrc
/ . ~/.zshrc
/ source ~/.config/fish/config.fish
or restart your terminal emulator.git clone https://github.com/cantino/mcfly
and cd mcfly
cargo install --path .
~/.cargo/bin
is in your $PATH
.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
Zsh:
bash
if [[ -r /path/to/mcfly.zsh ]]; then
source /path/to/mcfly.zsh
fi
Fish:
bash
if test -r /path/to/mcfly.fish
source /path/to/mcfly.fish
mcfly_key_bindings
end
. ~/.bashrc
/ . ~/.zshrc
/ source ~/.config/fish/config.fish
or restart your terminal emulator.To avoid McFly's UI messing up your scrollback history in iTerm2, make sure this option is unchecked:
A number of settings can be set via environment variables. To set a setting you should add the following snippets to your ~/.bashrc
/ ~/.zshrc
/ ~/.config/fish/config.fish
.
To swap the color scheme for use in a light terminal, set the environment variable MCFLY_LIGHT
.
bash / zsh:
bash
export MCFLY_LIGHT=TRUE
fish:
bash
set -gx MCFLY_LIGHT TRUE
By default Mcfly uses an emacs
inspired key scheme. If you would like to switch to the vim
inspired key scheme, set the environment variable MCFLY_KEY_SCHEME
.
bash / zsh:
bash
export MCFLY_KEY_SCHEME=vim
fish:
bash
set -gx MCFLY_KEY_SCHEME vim
cargo test
Cargo.toml
and bump the version.git add Cargo.toml
git ci -m 'Bumping to vx.x.x'
git tag vx.x.x
git push origin head --tags
pkg/brew/mcfly.rb
and update the version and SHAs. (shasum -a 256 ...
)cargo publish