Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Microsoft.PowerShell_profile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ if ($EDITOR_Override){
}
# Quick Access to Editing the Profile
function Edit-Profile {
vim $PROFILE.CurrentUserAllHosts
& $EDITOR $PROFILE.CurrentUserAllHosts
}
Set-Alias -Name ep -Value Edit-Profile

Expand Down Expand Up @@ -337,11 +337,12 @@ function winutildev {

# System Utilities
function admin {
$cwd = (Get-Location).ProviderPath
if ($args.Count -gt 0) {
$argList = $args -join ' '
Start-Process wt -Verb runAs -ArgumentList "pwsh.exe -NoExit -Command $argList"
Start-Process wt -Verb runAs -ArgumentList @('-d', $cwd, 'pwsh.exe', '-NoExit', '-Command', $argList)
} else {
Start-Process wt -Verb runAs
Start-Process wt -Verb runAs -ArgumentList @('-d', $cwd, 'pwsh.exe', '-NoExit')
}
}

Expand Down Expand Up @@ -755,7 +756,7 @@ Use '$($PSStyle.Foreground.Magenta)Show-Help$($PSStyle.Reset)' to display this h
}

if (Test-Path "$PSScriptRoot\CTTcustom.ps1") {
Invoke-Expression -Command "& `"$PSScriptRoot\CTTcustom.ps1`""
. (Join-Path -Path $PSScriptRoot -ChildPath 'CTTcustom.ps1')
}

Write-Host "$($PSStyle.Foreground.Yellow)Use 'Show-Help' to display help$($PSStyle.Reset)"
2 changes: 2 additions & 0 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ $themeInstalled = Install-OhMyPoshTheme -ThemeName "cobalt2"
Install-NerdFonts -FontName "CascadiaCode" -FontDisplayName "CaskaydiaCove NF"

# Final check and message to the user
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$fontFamilies = (New-Object System.Drawing.Text.InstalledFontCollection).Families.Name
if ((Test-Path -Path $PROFILE) -and (winget list --name "OhMyPosh" -e) -and ($fontFamilies -contains "CaskaydiaCove NF") -and $themeInstalled) {
Write-Host "Setup completed successfully. Please restart your PowerShell session to apply changes."
} else {
Expand Down