Skip to content

Instantly share code, notes, and snippets.

@Kambaa
Last active May 21, 2024 12:11
Show Gist options
  • Save Kambaa/a39e3307229dedbefc5d9bea2976d95a to your computer and use it in GitHub Desktop.
Save Kambaa/a39e3307229dedbefc5d9bea2976d95a to your computer and use it in GitHub Desktop.
Windows powershell profile (like bashprofile) settings.

Bash Profile Configurations For Powershell:

run this command:

notepad $Profile

if error given generate new one:

New-Item $profile -Type File -Force

Links:

Clear-Host
Import-Module posh-git
oh-my-posh init pwsh | Invoke-Expression

function QuitReplacement{
Invoke-command -ScriptBlock {exit}
}

function GradleRun{
Invoke-command -ScriptBlock {./gradlew run}
}

function GradleBuild{
Invoke-command -ScriptBlock {./gradlew clean build --refresh-dependencies}
}

function MavenCleanCompile{
Invoke-command -ScriptBlock {./mvnw clean compile -U}
}

New-Alias -Name q -Value QuitReplacement

New-Alias -Name gb -Value GradleBuild

New-Alias -Name gr -Value GradleRun

New-Alias -Name ci -Value MavenCleanCompile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment