René's URL Explorer Experiment


Title: [PSCustomObject] How to format the output of non-integer numbers? · Issue #19107 · PowerShell/PowerShell · GitHub

Open Graph Title: [PSCustomObject] How to format the output of non-integer numbers? · Issue #19107 · PowerShell/PowerShell

X Title: [PSCustomObject] How to format the output of non-integer numbers? · Issue #19107 · PowerShell/PowerShell

Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Open Graph Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

X Description: PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

Opengraph URL: https://github.com/PowerShell/PowerShell

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[PSCustomObject] How to format the output of non-integer numbers?","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\nI already opened a similar issue, then I did not receive a reasonable answer, I decided to wait until the new release, but nothing has changed.\r\n\r\nIf you use the table format, then trailing zeros are added to the non-integer numeric value:\r\n```powershell\r\n[pscustomobject] @{ dollar = 1.95; monat = 20.01 }\r\n\r\ndollar  monat\r\n------  -----\r\n 1,950 20,010\r\n ```\r\nIf I cast these values to a string type, then I will have to format the alignment in the columns of the table:\r\n```powershell\r\n[pscustomobject] @{ dollar = 1.95; monat = 20.01 }\r\n| Format-Table @{lab='dollar'; exp={$_.dollar.ToString()}; a='right'},\r\n               @{lab='monat'; exp={$_.monat.ToString()}; a='right'}\r\n\r\n\r\ndollar monat\r\n------ -----\r\n  1,95 20,01\r\n```\r\nor\r\n```powershell\r\n[pscustomobject] @{ dollar = [string] 1.95; monat = [string] 20.01 }\r\n| Format-Table @{lab='dollar'; exp={$_.dollar}; a='right'},\r\n               @{lab='monat'; exp={$_.monat}; a='right'}\r\n```\r\nOr get this object as a list.\r\n\r\nBut the situation is such that the script outputs an object with more than thirty values and six properties.\r\nThus, the complete list will be 30 * 6 + 30 separators = 210 lines. The only possible option is a table.\r\nBut I will not format the output of the script directly in the console.\r\n\r\nThe variant with alignment right during the formation of the object is also not suitable, because there will be indents when viewed as a list.\r\n\r\n```powershell\r\n[pscustomobject] @{ dollar = '{0,6}' -f 1.95; monat = '{0,5}' -f 20.01; weather = 'clear' }\r\n| Format-List\r\n\r\n\r\ndollar  :   1,95\r\nmonat   : 20,01\r\nweather : clear\r\n```\r\nAdvise what to do, in Windows it is tolerable, there is only one zero added, up to hundredths, and in Linux two zeros, up to thousandths.\r\n\r\n\r\n### Expected behavior\r\n\r\n```console\r\nTable view of PsCustomObject should not add trailing zeroes, should return value of non-integer numeric as is.\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nPSCustomObject adds trailing zeroes to table format.\r\n```\r\n\r\n\r\n### Error details\r\n\r\n```console\r\nNo Errors\r\n```\r\n\r\n\r\n### Environment data\r\n\r\n```powershell\r\nName                           Value\r\n----                           -----\r\nPSVersion                      7.4.0-preview.1\r\nPSEdition                      Core\r\nGitCommitId                    7.4.0-preview.1\r\nOS                             Linux 6.1.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 01 Feb 2023 17:07:39 +0000\r\nPlatform                       Unix\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\r\n```\r\n\r\n\r\n### Visuals\r\n\r\nHorror","author":{"url":"https://github.com/237dmitry","@type":"Person","name":"237dmitry"},"datePublished":"2023-02-04T23:31:45Z","url":"https://github.com/PowerShell/PowerShell/issues/19107"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:a04695cc-0b11-f296-f26b-42f61712db60
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id858E:B6856:478946:64B347:6AFDB876
html-safe-nonced0f2806bda1c7dd2bad25a7fdd126e44b28073cdc9ccddf9d76d01ca99bf26ad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NThFOkI2ODU2OjQ3ODk0Njo2NEIzNDc6NkFGREI4NzYiLCJ2aXNpdG9yX2lkIjoiNjMxMzEzNDM3Njc3NTE3MDE2NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4be16bf853710ef35265b76f181dd126dcf7ad0b8ba89698ade17048cb7acf8e
hovercard-subject-tagrepository:49609581
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/PowerShell/PowerShell/issues/19107
twitter:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/49609581/aad0ad80-cdec-11ea-8248-a37bc0571bfd
og:image:altPowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None8309f07eb60a4237a657068c83d0bb57be4c7e02937f5e9933126f4bd596aac4
turbo-cache-controlno-cache
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2f7154d847f1ddc5baa83b109a3e1d924605e2a3
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/19107#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F19107
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F19107
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/19107
Reloadhttps://github.com/PowerShell/PowerShell/issues/19107
Reloadhttps://github.com/PowerShell/PowerShell/issues/19107
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/19107
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/19107
[PSCustomObject] How to format the output of non-integer numbers?https://github.com/PowerShell/PowerShell/issues/19107#top
Resolution-AnsweredThe question is answered.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Answered%22
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 4, 2023https://github.com/PowerShell/PowerShell/issues/19107#issue-1571168253
latest released versionhttps://github.com/PowerShell/PowerShell/releases
FAQhttps://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md
Differences between Windows PowerShell 5.1 and PowerShellhttps://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
Nexthttps://github.com/PowerShell/PowerShell/issues/19107?timeline_page=1
237dmitryhttps://github.com/237dmitry
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Feb 4, 2023https://github.com/PowerShell/PowerShell/issues/19107#event-8439349073
https://github.com/rhubarb-geek-nz
rhubarb-geek-nzhttps://github.com/rhubarb-geek-nz
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1416894881
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1416907732
Table formatting non-integer numbers in [pscustomobject] #18492https://github.com/PowerShell/PowerShell/issues/18492
did receive a reasonable answer therehttps://github.com/PowerShell/PowerShell/issues/18492#issuecomment-1308978730
chose not to engage with it meaningfullyhttps://github.com/PowerShell/PowerShell/issues/18492#issuecomment-1309049945
calculated propertieshttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Calculated_Properties
rhubarb-geek-nzhttps://github.com/rhubarb-geek-nz
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1416925720
https://user-images.githubusercontent.com/78153320/216802720-517fdaca-932a-4559-9c5b-7e2e83989c4f.png
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1416927883
https://user-images.githubusercontent.com/78153320/216803559-8071edf5-8872-4469-b3a3-eea15e46625e.png
https://user-images.githubusercontent.com/78153320/216803613-b1daa3fc-410c-45ee-b6d9-261636d96a33.png
https://github.com/jhoneill
James O'Neill (jhoneill)https://github.com/jhoneill
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1417394017
Michael Klement (@mklement0)https://github.com/mklement0
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1417947239
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1417958478
https://user-images.githubusercontent.com/78153320/216824879-58696cde-334a-4d87-87fd-f4f622767656.png
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 5, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1418284102
my previous commenthttps://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1416907732
rhubarb-geek-nzhttps://github.com/rhubarb-geek-nz
.NET globalization and ICUhttps://learn.microsoft.com/en-us/dotnet/core/extensions/globalization-icu
https://github.com/dotnet/runtime/issueshttps://github.com/dotnet/runtime/issues
https://camo.githubusercontent.com/48103bd97897e225fe3347df01b6f28b242b8f6f795e582454de4ef9a11f333d/68747470733a2f2f6f70656e67726170682e6769746875626173736574732e636f6d2f323438376364353461376234343932633861643962643437383864346163633732626534353165616466353637363136383463333635613563336564396339642f646f746e65742f72756e74696d65
https://camo.githubusercontent.com/7e41d4698b37a89b2a8c06057583a5f48ce614b0fb7e2b93d27a2ec01c8f024b/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f66617669636f6e732f66617669636f6e2e737667
Issues · dotnet/runtimehttps://github.com/dotnet/runtime
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1418324031
https://github.com/dotnet/runtime/issueshttps://github.com/dotnet/runtime/issues
https://camo.githubusercontent.com/48103bd97897e225fe3347df01b6f28b242b8f6f795e582454de4ef9a11f333d/68747470733a2f2f6f70656e67726170682e6769746875626173736574732e636f6d2f323438376364353461376234343932633861643962643437383864346163633732626534353165616466353637363136383463333635613563336564396339642f646f746e65742f72756e74696d65
https://camo.githubusercontent.com/7e41d4698b37a89b2a8c06057583a5f48ce614b0fb7e2b93d27a2ec01c8f024b/68747470733a2f2f6769746875622e6769746875626173736574732e636f6d2f66617669636f6e732f66617669636f6e2e737667
Issues · dotnet/runtimehttps://github.com/dotnet/runtime
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1418338272
predefined formatting fileshttps://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Format.ps1xml
Addressing the Format challenges in PowerShell #10463https://github.com/PowerShell/PowerShell/issues/10463
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1418427650
https://user-images.githubusercontent.com/78153320/216872362-e6d01440-a1a4-4693-8bb6-6ca8780ed88c.png
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1418434989
237dmitryhttps://github.com/237dmitry
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1419803705
Michael Klement (@mklement0)https://github.com/mklement0
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Feb 6, 2023https://github.com/PowerShell/PowerShell/issues/19107#event-8452086460
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 8, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1423228284
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 8, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1423279614
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 8, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1423341286
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 9, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1424289369
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 9, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1424414384
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 9, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1424453609
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 9, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1424479115
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 9, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1424502928
https://user-images.githubusercontent.com/78153320/217882270-4f123aeb-bc5e-428a-af6d-c9d500c8a395.png
https://user-images.githubusercontent.com/78153320/217882310-70bc119e-c631-48df-867e-31774e9ad2e3.png
https://github.com/jhoneill
James O'Neill (jhoneill)https://github.com/jhoneill
on Feb 10, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1425679822
237dmitryhttps://github.com/237dmitry
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 10, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1425811217
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 10, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1426114470
dotnet/runtime#81853 (comment)https://github.com/dotnet/runtime/issues/81853#issuecomment-1424974267
https://github.com/237dmitry
237dmitryhttps://github.com/237dmitry
on Feb 10, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1426249476
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Feb 10, 2023https://github.com/PowerShell/PowerShell/issues/19107#issuecomment-1426264892
ICUhttps://icu.unicode.org/
https://learn.microsoft.com/en-us/dotnet/core/extensions/globalization-icu#app-local-icuhttps://learn.microsoft.com/en-us/dotnet/core/extensions/globalization-icu#app-local-icu
https://camo.githubusercontent.com/102d4b1352d8ba5c28ac10205beb1653d9de2eabca316d7156c85c0fb921fd6b/68747470733a2f2f6c6561726e2e6d6963726f736f66742e636f6d2f646f746e65742f6d656469612f646f746e65742d6c6f676f2e706e67
Globalization and ICU - .NEThttps://learn.microsoft.com/en-us/dotnet/core/extensions/globalization-icu
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 12, 2023https://github.com/PowerShell/PowerShell/issues/19107#event-8497497947
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/19107
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/19107
Resolution-AnsweredThe question is answered.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Answered%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.