Fluent-Search-Tasks icon indicating copy to clipboard operation
Fluent-Search-Tasks copied to clipboard

Eliminate Extra Newline in Clipboard and Harden Get-Random Usage in PowerShell Scripts

Open George551556 opened this issue 7 months ago • 2 comments

Why this change matters?

Currently every “copy to clipboard” step in the Random Everything plugin uses

Write-Output $value | clip

which always appends \r\n, leaving an unwanted newline behind the value copied in the clipboard.

what this PR changed?

  1. Removed trailing newline by replacing all Write-Output … | clip with Set-Clipboard -Value ….

  2. Clarified Get-Random calls by piping an explicit array (@(... ) | Get-Random) or using Get-Random -InputObject @(...).

  3. Cleaned up string literals to remove unnecessary escape sequences and ensure the arrays are passed correctly.

BUT the modified program has not been tested, WATCH OUT!!!

George551556 avatar Apr 30 '25 09:04 George551556

@George551556 thanks for the contribution! You can test this by dragging and dropping the YAML file into Fluent Search Tasks window

adirh3 avatar May 07 '25 16:05 adirh3

Yeah! I have tested it and proving it can play the role I want.

George551556 avatar May 08 '25 01:05 George551556

@George551556 I apologize for the delay, thanks a lot! Merged

adirh3 avatar Jul 15 '25 05:07 adirh3