Forum Discussion
sawtooth500
May 12, 2024Copper Contributor
Getting powershell to scroll horizontally instead of word wrap
Is it possible to get powershell to horizontally scroll for long lines of text instead of having them wrap automatically to the next line? I'm running python, and if you're familiar with python da...
May 12, 2024
Do you want to review the output and do nothing else with it? In Windows Terminal, you can resize it to fit your whole screen, but the output will be wrapped to the horizontal length of your monitor.
sawtooth500
May 12, 2024Copper Contributor
I do just want to review the output and nothing further, however I can't resize the window wide enough. I'd probably need 5000-7000 pixels of width to view it all without wrapping, that's too much for one or even two screens, hence why I want to see if it's possible to get a horizontal scroll with no wrap.
- May 12, 2024
sawtooth500 If you use PowerShell ands store something in a variable, you can pipe and wrap it using $variable | Format-Table -Wrap. If you use Get-Content c:\temp\xyz\123.txt, it should wrap it for you.
Example of using -Wrap, first output was without, then I edited the script and then you can see the difference.