Comments (2)
This behavior is by design for a simple reason. Write-Color is a wrapper against Write-Host. This means for every new color on same line Write-Host is used.
For example:
Write-Host -Object 'Test' -ForegroundColor Red -NoNewline
Write-Host -Object ' test2' -ForegroundColor Yellow
This will give you same thing as Write-Color -Text 'Test',' test2' -Color Red, Yellow
.
What you can do is use built-in transcript functionality into write-color Write-Color -LogFile YourPath -Color -...
this will mean it will display stuff as it would and save the same line (without colors) to text file.
from pswritecolor.
That is great, thanks. Overlooked that parameter somehow.
from pswritecolor.
Related Issues (12)
- Default alias of wc will interfere with wc command on *nix systems HOT 2
- NuGet package does not install properly (v.0.85.0) HOT 4
- .net core issues when using function on mac HOT 8
- Doesn't seem to accept parameters when passed HOT 9
- request: support multiline split with separator HOT 2
- Transcript with Write-Color HOT 1
- write-color transcript output showing up on different lines HOT 1
- Improvment HOT 1
- Enhancement - Added PadLeft; PadCenter; PadRight; and PadCharacter Parameters to Write-Color Function HOT 3
- Extra Spaces in Log Files HOT 1
- show text like a progressbar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pswritecolor.