Linux command
mcfly 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Initialize mcfly in bash
eval "$(mcfly init bash)"
Initialize mcfly in zsh
eval "$(mcfly init zsh)"
Initialize mcfly in fish
mcfly init fish | source
Search history for a pattern
mcfly search [pattern]
Add a command to history
mcfly add "[command]"
Train the suggestion engine
mcfly train
说明
mcfly is an intelligent shell history search tool written in Rust that uses a small neural network to suggest the most likely command based on context. It considers working directory, recent commands, exit status, and command patterns. The tool replaces Ctrl+R with a smarter search that prioritizes commands based on relevance rather than recency alone. It stores history in a SQLite database, which can be rebuilt if deleted.
参数
- search _pattern_
- Search history for matching commands.
- add _command_
- Add a command to the mcfly history database.
- train
- Train the neural network suggestion engine.
- move
- Record a directory having been moved.
- init _shell_
- Output shell initialization script (bash, zsh, or fish).
- --mcfly-history _path_
- Shell history file to read from when adding or searching.
- --session-id _id_
- Session ID to record or search under.
- -d, --debug
- Enable debug output.
- -h, --help
- Display help information.
- -V, --version
- Display version information.
FAQ
What is the mcfly command used for?
mcfly is an intelligent shell history search tool written in Rust that uses a small neural network to suggest the most likely command based on context. It considers working directory, recent commands, exit status, and command patterns. The tool replaces Ctrl+R with a smarter search that prioritizes commands based on relevance rather than recency alone. It stores history in a SQLite database, which can be rebuilt if deleted.
How do I run a basic mcfly example?
Run `eval "$(mcfly init bash)"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does search _pattern_ do in mcfly?
Search history for matching commands.