zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.95k stars 1.86k forks source link

Include files as a suggestion to the command #584

Closed manjunathb4461 closed 3 years ago

manjunathb4461 commented 3 years ago

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

ericfreese commented 3 years ago

Hi, have you tried using the completion suggestion strategy?

Side note: while using it, you will also probably also want to enable asynchronous mode since generating completions can sometimes take a relatively long time.

manjunathb4461 commented 3 years ago

thanks Eric

NightMachinery commented 3 years ago

@Eric Freese commented on Feb 11, 2021, 8:15 PM GMT+3:30:

Hi, have you tried using the completion suggestion strategy?

Side note: while using it, you will also probably also want to enable asynchronous mode since generating completions can sometimes take a relatively long time.

Can we have this as another engine? completion does not return files in a lot of scenarios.

ericfreese commented 3 years ago

Can we have this as another engine? completion does not return files in a lot of scenarios.

Yeah I wouldn't be opposed to this. Can you make another ticket for the feature request that explains these scenarios and why completion would not work in those cases?