11 ms·
This is one of the things that Fish shell gets right out of the box. Command autocomplete is per-directory, and shows you a preview of the commands as you type.
by ianlevesque 5y ago
This is one of the things that Fish shell gets right out of the box. Command autocomplete is per-directory, and shows you a preview of the commands as you type.
- wzdd 5y agoI had thought that too, but, interestingly enough, this doesn't seem to be the case. ~/.local/share/fish/fish_history does not include the cwd. In fact it seems like Fish does something better: when adding to the history, it sees if any of the arguments to the command are valid file paths. These are stored separately. Fish will then autocomplete the command if detected paths are valid. So for example if you run "git log somefile", whenever "somefile" is in your cwd you will get an autocompletion for that command. This matches the documentation (https://fishshell.com/docs/current/interactive.html#history-search https://fishshell.com/docs/current/interactive.html#history-...) which says "fish suggests commands as you type, based on command history, completions, and valid file paths".
- ianlevesque 5y agoNeat. That is even better.