@@ -95,8 +95,8 @@ function Remove-MyItem {
95
95
param (
96
96
[Parameter (Mandatory = $false )]
97
97
[switch ]$rf ,
98
- [Parameter (Mandatory = $true , Position = 0 )]
99
- [string ]$Path
98
+ [Parameter (Mandatory = $true , Position = 0 , ValueFromRemainingArguments = $true )]
99
+ [string [] ]$Path
100
100
)
101
101
Remove-Item $Path - Recurse:$rf - Force:$rf
102
102
}
@@ -113,11 +113,6 @@ Set-Alias -Name 'which' -Value 'Get-CommandInfo'
113
113
# Remove-Item Alias:rm -Force -ErrorAction SilentlyContinue
114
114
Set-Alias - Name ' rm' - Value ' Remove-MyItem'
115
115
116
- # lazygit
117
- if (Get-Command lazygit - ErrorAction SilentlyContinue) {
118
- Set-Alias - Name ' lg' - Value ' lazygit'
119
- }
120
-
121
116
# ----------------------------------------------------------------------------------- #
122
117
# We need 'posh-alias' module to add the following aliases.
123
118
if (! (Get-Command ' Add-Alias' - ErrorAction SilentlyContinue)) {
@@ -134,7 +129,7 @@ if (Get-Command eza -ErrorAction SilentlyContinue) {
134
129
Add-Alias la " eza $_eza_params -al --time-style=relative --sort=modified"
135
130
Add-Alias ld " eza $_eza_params -lDa --show-symlinks" # lists only directories
136
131
Add-Alias lf " eza $_eza_params -lfa --show-symlinks" # lists only files (included hidden files)
137
- Add-Alias ll " eza $_eza_params -lbhHigUmuSa" # Lists everything in details of date
132
+ Add-Alias ll " eza $_eza_params -lbhHigUmuSa" # Lists everything in details of date
138
133
Add-Alias lt " eza $_eza_params -lT" # Tree view of detailed information
139
134
Add-Alias tree " eza $_eza_params --tree" # Tree view
140
135
}
@@ -161,17 +156,15 @@ Add-Alias edge 'Start-Process microsoft-edge:'
161
156
# Source: - https://stackoverflow.com/questions/11546069/refreshing-restarting-powershell-session-w-out-exiting
162
157
if (Test-Path - Path $PROFILE ) {
163
158
Add-Alias reload ' . $PROFILE'
164
- }
165
- else {
159
+ } else {
166
160
Add-Alias reload ' . $PROFILE.CurrentUserAllHosts'
167
161
}
168
162
Add-Alias restart ' Get-Process -Id $PID | Select-Object -ExpandProperty Path | ForEach-Object { Invoke-Command { & "$_" } -NoNewScope }'
169
163
170
164
# windows system
171
165
if (Get-Command fastfetch - ErrorAction SilentlyContinue) {
172
166
Add-Alias sysinfo ' fastfetch -c all'
173
- }
174
- else {
167
+ } else {
175
168
Add-Alias sysinfo ' Get-ComputerInfo'
176
169
}
177
170
@@ -191,4 +184,4 @@ Add-Alias HKCU: 'Set-Location HKCU:'
191
184
Add-Alias npm- list ' ([string]::join(" ", ((npm ls -g --depth=0) | select -skip 1 | select -skiplast 1 | % { $_.remove(0,4) }))).Replace(" ","`r`n")'
192
185
193
186
# Use VBoxManage without adding it to PATH
194
- # Add-Alias vboxmanage '&"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" $args'
187
+ # Add-Alias vboxmanage '&"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" $args'
0 commit comments