...
 
Commits (3)
[CmdletBinding()]
Param (
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$Files
[string[]]$Path
)
& clang-format -i (Get-Item $Files | Select -Expand FullName)
Process {
ForEach($_ in $Path) {
Try {
$n = Get-Item $_ -ErrorAction Stop | Select -Expand FullName
& clang-format -i $n
} Catch {
Write-Error $_
}
}
}
[CmdletBinding()]
Param (
[Parameter(Mandatory=$True, ValueFromPipeline=$True)]
[string[]]$Path,
[string]$Style="vim"
)
Process {
ForEach($_ in $Path) {
Try {
$n = Get-Item $_ -ErrorAction Stop | Select -Expand FullName
& pygmentize -f terminal16m -O style=$Style $n
} Catch {
Write-Error $_
}
}
}