Skip to content

Instantly share code, notes, and snippets.

@LuanRoger
Last active January 5, 2024 19:01
Show Gist options
  • Save LuanRoger/546a11d5789b72f2c3155c58e5051076 to your computer and use it in GitHub Desktop.
Save LuanRoger/546a11d5789b72f2c3155c58e5051076 to your computer and use it in GitHub Desktop.
PowerShell 7 profile
Invoke-Expression (&starship init powershell)
$TERM_HOME=[Environment]::GetFolderPath([System.Environment+SpecialFolder]::MyDocuments) + "\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
@LuanRoger
Copy link
Author

LuanRoger commented Mar 8, 2022

Adaptation of the original PowerShell profile (Scott Hanselman) Not anymore.

@LuanRoger
Copy link
Author

Dependencies:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment