Skip to content

Commit 6999fec

Browse files
committed
✨ feat: added npm-list aliases for powershell (list NPM global packages)
1 parent 0dd5574 commit 6999fec

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dotposh/Config/posh-aliases.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,6 @@ Add-Alias profiles 'Get-PSProfile {$_.exists -eq "True"} | Format-List'
185185

186186
Add-Alias HKLM: 'Set-Location HKLM:'
187187
Add-Alias HKCU: 'Set-Location HKCU:'
188+
189+
# List NPM Global Packages
190+
Add-Alias npm-list '([string]::join(" ", ((npm ls -g --depth=0) | select -skip 1 | select -skiplast 1 | % { $_.remove(0,4) }))).Replace(" ","`r`n")'

0 commit comments

Comments
 (0)