kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
755 stars 35 forks source link

`Set-PsFzfOption` `PSReadlineChordReverseHistory` - Multi Line Command #137

Open mattcargile opened 2 years ago

mattcargile commented 2 years ago

I want to look more at the .dll but I don't think it handles multi line commands. I think there needs new if logic to handle the backtick ( ` ) on particular lines within the ReverseLineReader.cs. Below is the way the Microsoft folks do it in the PSReadline repo sample.

https://github.com/PowerShell/PSReadLine/blob/dc38b451bee4bdf07f7200026be02516807faa09/PSReadLine/SamplePSReadLineProfile.ps1#L43

Here is an example screenshot.

image

kelleyma49 commented 2 years ago

Good catch. It doesn't currently look at mult-line commands. Let me see how easy this is to add.

snowman commented 2 years ago

read-history-of-multiple-line-command

It would be awesome if -PSReadlineChordReverseHistory option shows the multiple-line command as a single line with fzf, but show the details(full multiple-lines) within the sidebar preview

mattcargile commented 1 year ago

I'm going to attempt to touch this now.

EDIT 1: I couldn't get it fully. I spent too much time attempting to understand the code. I'm closer though.