kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
819 stars 37 forks source link

Don't list files if Invoke-FzfPsReadlineHandlerProvider command conta… #9

Closed stinos closed 3 years ago

stinos commented 7 years ago

…ins cd

If the commandline already has a 'cd' command it's no use listing files since the user cannot cd to them. With this patch, entering 'cd <some/dir> Ctrl-T' will result in fzf being launched only for the subdirectories of some/dir, not for the files.

kelleyma49 commented 7 years ago

Hmm, let me think about this one.

I use PowerShell Community Extensions which aliases cd to Set-LocationEx. Set-LocationEx will work even if the input is a file. I find this useful as I know the file I want, but I may not remember directories. We can probably check if cd is aliased to Set-LocationEx, or maybe I can have a "cdf" function that allows cd'ing to the directory of the selected file.

stinos commented 3 years ago

closing: it's a bit too limiting too for the cd to be in the front of the commandline