Closed haosmos closed 3 years ago
Hi @haosmos . Thanks for your kind words. You should be able to do something like this:
function PowerColorLSWithParams([string] $query = ".") { PowerColorLS $query -l -ds -sd -a }
Set-Alias -Name ls -Value PowerColorLSWithParams -Option AllScope
This will also allow you to send a path argument to the ls alias.
Thank you so much! It works!
Hi!
Thank you for your wonderful script!
Please tell me how to configure alias for the PowerColorLS command with options:
-l -ds -sd -a?
In other words, I want the command "ls" to be a replacement for such a command:
ls -l -ds -sd -a
I have tried to investigate this issue and the only thing I have understood is that there is no way to pass the parameters of the cmdlet into the alias. To execute an alias with parameters, you need to use a function to do this.
But I don't understand how to write such a function for my case, because I'm completely unfamiliar with the language Powershell.
Help me, please.