navi fish plugin with ability to edit commandline
here's my version of the fish plugin. I adapted it from the fzf plugin which allows to go through the command line history (ctrl-r). the fzf_tmux_height variables don't seem to have an effect.
there's also an issue where if you cancel navi (ctrl-c), you still have some invisible ^C / ctrl-c character left in the commandline. So your next command will not work unless you press ctrl-c again. This should probably be fixed somehow.
I had a problem where the line where I call navi would show prompts when run from the shell, but not in the function. I searched around the fish shell issues and running "stty sane" was suggested as a solution.
doc(#121): Clarify that oh-my-zsh does not add navi to PATH.
I've updated the documentation for oh-my-zsh setup to explicitly state that navi won't be callable as a command unless it is also installed or manually added to PATH, along with instructions on how to do that.
Cheers,
Alex
Say we have a cheat with a free input for `<foo>` and there's another cheat with suggestions for `<foo>`. If you select a command from the first cheat, the suggestions in the second cheat would be used, before this PR.
Thanks for making this project, it's really cool! I'd been looking for something like this for a while.
I noticed that your shell widget is pretty much stand-alone and I wanted to be able to use navi directly as an [oh-my-zsh][1] plugin, so I added a few things to the widget and moved it to the root of the repository so that the repo can be cloned straight into the `plugins` folder and detected when added in the plugin array.
I think it should be similarly simple with `fish`, but I'm not too familiar with that shell, so I'll leave it to someone else. The `navi.plugin.zsh` file should still be sourcable as a widget for people not using oh-my-zsh, so technically the `shell/` directory could be removed and `navi widget`updated to use the new file.
## What's included
- oh-my-zsh plugin
- install documentation
- no PATH modification required when used with OMZ
- Added bonus: #51 is kind of unofficially addressed by this (assuming one uses OMZ)
## Future Work
- Pre-filter using `$BUFFER` when hitting `Alt+G` to get something similar to `navi query`
- Update `navi widget zsh` to use `navi.plugin.zsh`
Let me know what you think. I'm working on a few cheatsheets, and will open PRs for those as they become ready.
Cheers,
Alex
[1]: https://github.com/robbyrussell/oh-my-zsh