Skip to content

Instantly share code, notes, and snippets.

@milnak
Last active April 2, 2025 00:19
Show Gist options
  • Save milnak/036c0cf14200ee8489ba8036ccde0853 to your computer and use it in GitHub Desktop.
Save milnak/036c0cf14200ee8489ba8036ccde0853 to your computer and use it in GitHub Desktop.
Scoop Aliases
Get-ChildItem -LiteralPath "${env:HOMEDRIVE}${env:HOMEPATH}/scoop/shims" -File -Recurse -Filter 'scoop-*.ps1' `
| Select-Object `
@{ Name = 'Name'; Expression = { $_.BaseName.SubString(6) } },
@{ Name = 'Command'; Expression = { (Get-Content $_.FullName | Select-String -Pattern '^# Summary: (.*)' -NotMatch) -replace '''','''''' } },
@{ Name = 'Summary'; Expression = { (Get-Content $_.FullName | Select-String -Pattern '^# Summary: (.*)').Matches[0].Groups[1] }} `
| ForEach-Object {
"scoop alias add '$($_.Name)' '$($_.Command)' '$($_.Summary)'"
}
scoop alias add 'c' 'scoop cleanup $args[0]' 'Alias for "scoop cleanup"'
scoop alias add 'cc' 'scoop cache rm *' 'Alias for "scoop cache rm *"'
scoop alias add 'i' 'scoop install $args[0]' 'Alias for "scoop install"'
scoop alias add 'ls' 'scoop list' 'Alias for "scoop list"'
scoop alias add 'lsf' 'scoop list | Select-Object Source,Name,Version | ForEach-Object { $app = ''{0}/{1}'' -f $_.Source, $_.Name; $info = scoop.ps1 info $app; [PSCustomObject]@{ ''App'' = $app; ''Version'' = $_.Version; ''Description'' = $info.Description; ''Website'' = $info.Website } }' 'List installed apps along with description and website'
scoop alias add 'ri' 'scoop rm $args[0] && scoop cache rm $args[0] && scoop install $args[0]' 'Combined "scoop rm", "scoop cache rm" and "scoop install"'
scoop alias add 'rm' 'scoop uninstall $args[0]' 'Alias for "scoop uninstall"'
scoop alias add 'ru' 'scoop cache rm $args[0] && scoop update $args[0]' 'Combined "scoop cache rm" and "scoop update"'
scoop alias add 's' 'scoop search $args[0]' 'Alias for "scoop search"'
scoop alias add 'u' 'scoop update $args[0]' 'Alias for "scoop update"'
scoop alias add 'up' 'scoop update * && scoop cleanup *' 'Combined "scoop update" and "scoop cleanup"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment