zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.81k stars 1.85k forks source link

[FR] Include files as a suggestion to the command #598

Open NightMachinery opened 3 years ago

NightMachinery commented 3 years ago

This is a resubmit of https://github.com/zsh-users/zsh-autosuggestions/issues/584 .

Is your feature request related to a problem? Please describe.

In most of the cases the user would be traversing some files from directory, so what if that is also provided as a suggestion

Describe the solution you'd like

suppose user types some command, then this plugin would complete it with first file/directory by order, by modified time or by alphabetical order as a suggestion
eg, whenever user types cd /usr/local/ plugin completes it with cd /usr/local/bin

Describe alternatives you've considered

currently users keep hitting tabs until what they want is suggested to them, that can be made easier using this plugin

Additional context

This suggestion can be made only if current suggestion based on history returns none

In that thread, using the completion engine is recommended. This has two drawbacks: