Last active
December 1, 2023 16:28
-
-
Save kszinhu/a74b36d6662807dfe22c17d468afd5f4 to your computer and use it in GitHub Desktop.
My PowerShell Profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Expression (&starship init powershell) | |
# Another inits | |
Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion" | |
Import-Module git-aliases -DisableNameChecking | |
Import-Module posh-git | |
# Alias cd to directories | |
function cd_to_projects { set-location "C:\Users\rodri\projects" } | |
set-alias projects cd_to_projects | |
# Custom Alias | |
if (Get-Module yarnProfile) { return } | |
function Install-YarnPackage { yarn install --emoji @Args } | |
New-Alias yi Install-YarnPackage | |
function Add-YarnPackage { yarn add @Args --emoji } | |
New-Alias ya Add-YarnPackage | |
function Add-YarnPackageDev { yarn add --emoji --dev @Args } | |
New-Alias yad Add-YarnPackageDev | |
function Add-YarnPackageGlobal { yarn global add --emoji @Args } | |
New-Alias yag Add-YarnPackageGlobal | |
function Remove-YarnPackage { yarn remove @Args --emoji } | |
New-Alias yrm Remove-YarnPackage | |
function Remove-YarnPackageGlobal { yarn global remove --emoji @Args } | |
New-Alias yrmg Remove-YarnPackageGlobal | |
function Invoke-YarnPackageRun { yarn run --emoji @Args } | |
New-Alias yrun Invoke-YarnPackageRun | |
function Get-YarnPackageOutdated { yarn outdated --emoji @Args } | |
New-Alias yout Get-YarnPackageOutdated | |
function Update-YarnPackage { yarn upgrade --emoji @Args } | |
New-Alias yup Update-YarnPackage | |
function Invoke-YarnPackageRunStart { yarn run --emoji start @Args } | |
New-Alias yst Invoke-YarnPackageRunStart | |
function Invoke-YarnPackageRunTest { yarn run --emoji test @Args } | |
New-Alias ytest Invoke-YarnPackageRunTest | |
# Suggestions | |
Import-Module PSReadLine | |
Set-PSReadLineOption -PredictionSource History |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Terminal PowerShell Unix like
How to:
> scoop install starship
PowerShell
:PSReadLine
:posh-git
Caso execute o último comando não precisa adicionar ao profile (já que o mesmo faz isso).
alias
que estão no arquivo fique a vontade.