Git Product home page Git Product logo

formatpx's People

Contributors

kirkmunro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

formatpx's Issues

I'd love to see the source for this!

FormatPx is awesome. I have some experience monkey-patching the formatting commands, and I would love to see your approach. Are you sharing the source anywhere?

Thanks!

Incompatible with PowerShell 7

Not sure if there is some workaround for this

PS H:\> Import-Module FormatPx -Verbose
VERBOSE: Loading module from path 'C:\Users\jcrook\Documents\PowerShell\Modules\FormatPx\1.1.3.15\FormatPx.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module FormatPx.
VERBOSE: Loading module from path 'C:\Users\jcrook\Documents\PowerShell\Modules\FormatPx\1.1.3.15\FormatPx.dll'.
VERBOSE: Importing cmdlet 'Format-Custom'.
VERBOSE: Importing cmdlet 'Format-Default'.
VERBOSE: Importing cmdlet 'Format-List'.
VERBOSE: Importing cmdlet 'Format-Table'.
VERBOSE: Importing cmdlet 'Format-Wide'.
VERBOSE: Importing cmdlet 'Out-Default'.
VERBOSE: Importing cmdlet 'Out-File'.
VERBOSE: Importing cmdlet 'Out-Host'.
VERBOSE: Importing cmdlet 'Out-Printer'.
VERBOSE: Importing cmdlet 'Out-String'.
VERBOSE: Loading module from path 'C:\Users\jcrook\Documents\PowerShell\Modules\SnippetPx\1.0.6.19\SnippetPx.psd1'.
VERBOSE: Importing cmdlet 'Get-Snippet'.
VERBOSE: Importing cmdlet 'Invoke-Snippet'.
VERBOSE: Loading module from path 'C:\Users\jcrook\Documents\PowerShell\Modules\FormatPx\1.1.3.15\FormatPx.psm1'.
ObjectNotFound: The 'Out-String' command was found in the module 'FormatPx', but the module could not be loaded due to the following error: [Could not load type 'System.Management.Automation.WorkflowInfo' from assembly 'System.Management.Automation, Version=7.3.2.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
For more information, run 'Import-Module FormatPx'.

I did find #11503 but it seems that got reverted and broke this again

FormatPx 1.0.0.1 does not work with the Microsoft AD cmdlets

Issue reported via email from a FormatPx user:

I'm using your great FormatPx module (added to my profile), but I'm getting some errors when working with the Active Directory module. Here is an example when running Get-ADDomain:

Out-Default : Unable to cast object of type 'Microsoft.ActiveDirectory.Management.ADPropertyValueCollection' to type 'System.Collections.Generic.Stack`1[FormatPx.FormatRecord]'.
+ CategoryInfo : NotSpecified: (:) [Out-Default], InvalidCastException
+ FullyQualifiedErrorId : System.InvalidCastException,FormatPx.OutDefaultCommand

Any thoughts?

FormatPx.dll Source Code

I see that the source to FormatPx.dll is not included in this repo, and unfortunately decompilers do not appear to do a good job of understanding the binary.

As including the source directly within the repo would mess up your Install-GitHubHostedModule script, would it potentially be possible to include a zip of the binary's source in a response to this issue, or as an attachment to releases?

Regards,
lordmilko

Support request for Linux PowerShell Core

Import module have to happen without errors in Linux. I have this module path listed in PS $env:PSModulePath.

$ Import-Module FormatPx -Verbose
VERBOSE: Loading module from path '/root/XX/library/FormatPx/FormatPx.psd1'.
VERBOSE: Loading module from path '/root/XX/library/FormatPx/FormatPx.dll'.
Import-Module : Could not load type 'Microsoft.PowerShell.Commands.OutPrinterCommand' from assembly 'Microsoft.PowerShell.Commands.Utility, Version=6.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
At line:1 char:1

  • Import-Module FormatPx -Verbose
  • CategoryInfo : NotSpecified: (:) [Import-Module], TypeLoadException
  • FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

Version Info:
$PSVersionTable

Name Value


PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Linux 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0โ€ฆ}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

FormatPx 1.0.3.4 does not work properly on PowerShell 5.0

This was reported to me via email:

I'm loading FormatPx in my profile, and I believe I`m running the latest version:

PS [2]: get-module
ModuleType Version Name ExportedCommands


Script 1.0.3.4 FormatPx

The following seems to fail:

Format-Table : Failed to find internal PSNoteProperty field.
At C:\Users\username\Documents\WindowsPowerShell\profile.ps1:118 char:38

  • Get-PSDrive -PSProvider FileSystem | Format-Table Name,Root -AutoSize
  •                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (System.Collecti...x.FormatRecord]:PSNoteProperty) [Format-Table], FieldAccessException
    • FullyQualifiedErrorId : System.FieldAccessException,FormatPx.FormatTableCommand

__FormatData property shows up in unexpected places in 1.0.1.2 and earlier

Reported from direct email:

When using this Get-Phonetic function, __FormatData is outputted:

PS [4]: 'jOIHU56%%3##kdj?=4/' | Get-Phonetic

Input text: jOIHU56%%3##kdj?=4/

                          Char Phonetic                           __FormatData                    
                          ---- --------                           ------------                    
                             j juliett                            {FormatPx.FormatRecord}         
                             O OSCAR                              {FormatPx.FormatRecord}         
                             I INDIA                              {FormatPx.FormatRecord}         
                             H HOTEL                              {FormatPx.FormatRecord}         
                             U UNIFORM                            {FormatPx.FormatRecord}         
                             5 five                               {FormatPx.FormatRecord}         
                             6 six                                {FormatPx.FormatRecord}         
                             % %                                  {FormatPx.FormatRecord}         
                             % %                                  {FormatPx.FormatRecord}         
                             3 three                              {FormatPx.FormatRecord}         
                             # #                                  {FormatPx.FormatRecord}         
                             # #                                  {FormatPx.FormatRecord}         
                             k kilo                               {FormatPx.FormatRecord}         
                             d delta                              {FormatPx.FormatRecord}         
                             j juliett                            {FormatPx.FormatRecord}          
                             ? questionmark                       {FormatPx.FormatRecord}         
                             = =                                  {FormatPx.FormatRecord}         
                             4 four                               {FormatPx.FormatRecord}         
                             / /                                  {FormatPx.FormatRecord}   

Expected or bug?

FormatPx 1.0.2.3 and earlier prevents several Format-* | Out-* scenarios from working properly

Versions 1.0.2.3 and earlier of FormatPx have a flaw that prevents several scenarios where Format-* cmdlets would be piped to Out-* cmdlets from working as expected. Since FormatPx proxies the Format-* cmdlets, and since those proxies return object data rather than format data, scripts written that would pipe format data to Out-* cmdlets (Out-String, Out-File) end up piping object data to those cmdlets instead.

Question on format-table... getting format-list output

Kirk,

First - Thanks for the module! I have a question, don't know if it is an issue or pilot error.

I have another module I use which imports FormatPX, I had noticed a format issue when I ran my code in a new PS window for the first time (did not have the issue on a second run in the same window). I trimmed my code to this to reproduce it.

My problem: When I do a format-table on the object (test #1), it displays as expected, after I load the FormatPX and do the same format-table (test #2), I get a format-list output instead of format-table.

==code-sample==================
$menuObj = @(
[pscustomobject]@{choice="1";labelx="x";function="Function #1";desc="Description...1"; status="x"},
[pscustomobject]@{choice="2";labelx="x";function="Function #2";desc="Description...2"; status="x"}
)

write-host "nn Test #1 "
$menuObj |Format-Table

Import-Module FormatPX
(Get-Module FormatPX).Version

write-host "nn Test #2 "

$menuObj |Format-Table

Execution of script output:
PS C:\Users\Administrator\OneView-shell> .\test.ps1

Test #1

choice labelx function desc status


1 x Function #1 Description...1 x
2 x Function #2 Description...2 x

Major Minor Build Revision


1 1 3 15

Test #2

choice : 1
labelx : x
function : Function #1
desc : Description...1
status : x

choice : 2
labelx : x
function : Function #2
desc : Description...2
status : x

PS C:\Users\Administrator\OneView-shell>

Additional info
PS C:\Users\Administrator\OneView-shell> $PSVersionTable

Name Value


PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.17929
BuildVersion 6.3.9600.16406
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2

Thanks
-Kelly

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.