28 lines
913 B
PowerShell
Executable File
28 lines
913 B
PowerShell
Executable File
$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
|