Skip to content

Commit

Permalink
Fix uniq key
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Mar 1, 2024
1 parent c82e085 commit 4dc2f41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ And this

```pwsh
function Get-History-Fzf([String]$line) {
[Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems() | ForEach-Object {$_.CommandLine.ToString()} | Select-String "." | Sort-Object ToString | Get-Unique | Sort-Object LineNumber -Descending | fzf --scheme=history --no-sort --query=$line
[Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems() | ForEach-Object {$_.CommandLine.ToString()} | Select-String "." | Sort-Object | Get-Unique | Sort-Object LineNumber -Descending | fzf --scheme=history --no-sort --query=$line
}
Set-PSReadLineKeyHandler -Chord Ctrl+r -ScriptBlock {
Expand Down
2 changes: 1 addition & 1 deletion fzf-history.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function Get-History-Fzf([String]$line) {
[Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems() | ForEach-Object {$_.CommandLine.ToString()} | Select-String "." | Sort-Object ToString | Get-Unique | Sort-Object LineNumber -Descending | fzf --scheme=history --no-sort --query=$line
[Microsoft.PowerShell.PSConsoleReadLine]::GetHistoryItems() | ForEach-Object {$_.CommandLine.ToString()} | Select-String "." | Sort-Object | Get-Unique | Sort-Object LineNumber -Descending | fzf --scheme=history --no-sort --query=$line
}

0 comments on commit 4dc2f41

Please sign in to comment.