0
0
.dotfiles/.psrc.ps1

28 lines
913 B
PowerShell
Raw Permalink Normal View History

2024-09-07 00:47:46 -04:00
$aliasFilePath="$env:USERPROFILE\.dotfiles\.aliases.ps1"
function New-CommandAlias {
param(
[parameter(Mandatory=$true)]$Name,
[parameter(Mandatory=$true)]$Cmd,
[parameter(Mandatory=$true)]$Alias
)
$functionFormat = "function $Name { $Cmd `$args }
New-Alias -Name $Alias -Value $Name -Force -Option AllScope"
$newLine = [Environment]::NewLine
Add-Content -Path $aliasFilePath -Value "$newLine$functionFormat"
. $aliasFilePath
}
. $aliasFilePath
function bg() {Start-Process -NoNewWindow @args}
$repo="$env:USERPROFILE\Desktop\ART\@tablets-stuff"
. $env:USERPROFILE\.completion.ps1
# function Prompt {
# $date=$(Get-Date -Format "dddd, dd/MM/yyyy hh:mm:ss.FFF tt")
# Write-Host ("$date | $(Get-Location) `n▻") -ForegroundColor 3 -NoNewline
# return " "
# }
. $env:USERPROFILE\.dotfiles\.poshrc.ps1