Last active
January 3, 2025 14:16
-
-
Save LuanRoger/546a11d5789b72f2c3155c58e5051076 to your computer and use it in GitHub Desktop.
PowerShell 7 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) | |
$DOCUMENTS=[Environment]::GetFolderPath([System.Environment+SpecialFolder]::MyDocuments) | |
$TERM_HOME=$DOCUMENTS + "\Jobs" | |
$customAliases = @("ls", "customalias", "ff", "getdir", "gohome") | |
function GetDirAlias { | |
(Get-Location).Path | clip | |
} | |
function GoToHomeDirectory { | |
Set-Location $TERM_HOME | |
} | |
function ListCustomAlias { | |
Get-Alias -Name $customAliases | |
} | |
function FastFind { | |
fzf | ForEach-Object { Start-Process ([string]::Format(".\{0}", $_)) } | |
} | |
Set-Alias -Name ls -Value lsd | |
New-Alias -Name customalias -Value ListCustomAlias | |
New-Alias -Name ff -Value FastFind | |
New-Alias -Name getdir -Value GetDirAlias | |
New-Alias -Name gohome -Value GoToHomeDirectory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Adaptation of the original PowerShell profile (Scott Hanselman)Not anymore.