[feature] Get-Font

This commit is contained in:
Klesh Wong 2021-01-17 16:50:51 +08:00
parent 67cee9064e
commit 5620deecef
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,18 @@
function Get-Font{
[CmdletBinding()]
param(
[string] $keyword
)
[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$families = (New-Object System.Drawing.Text.InstalledFontCollection).Families
foreach ($family in $families) {
if (-not $keyword || $family.Name.Contains($keyword)) {
echo $family.Name
}
}
}
Export-ModuleMember -Function Get-Font

View File

@ -14,6 +14,7 @@ $Env:PSModulePath += ";$Dir\Modules"
$Env:KUBE_EDITOR = 'nvim'
$Env:EDITOR = 'nvim'
Set-Alias -Name k kubectl
Set-Alias -Name bm Open-Bookmark
$isPs7 = $host.Version.Major -ge 7
if ( $isPs7 ) {
Set-Prompt