Skip to content

Repository files navigation

PSDiff

PowerShell wrapper + additional functionality around the diff part of https://github.com/google/diff-match-patch

This is using a slightly customized version of the c# version provided in the diff-match-patch repository (mainly replacing protected by public and implementing the suggested line and word modes).

OutConsoleDiff For usage check the documentation and the tests. The PSDiff module exports the following functions:

FunctionSynopsisDocumentation
ConvertFrom-DiffToHtmlConvert a diff to hmtl, output to file and open in browser (unless specified)Link
ConvertFrom-DiffToTextConverts a diff (output of one of the Get-*Diff commands) to a source (text1) and destination (text2)Link
Get-CharDiffGet a diff of two strings character by characterLink
Get-CommonOverlapLengthGet the length of a common suffix or prefix overlap for two stringsLink
Get-CommonPrefixLengthGet the length of a common prefix for two stringsLink
Get-CommonSuffixLengthGet the length of a common suffix for two stringsLink
Get-LineDiffGet a diff of two texts based on lines rather than chars or wordsLink
Get-WordDiffGet a diff of two texts based on words rather than charsLink
Out-ConsoleDiffDiffs two strings and outputs the results side by side in the console color coded and with line numbers.Link

About

PowerShell wrapper + additional functionality around the diff part of https://github.com/google/diff-match-patch

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages