I have gnuwin32 installed and appended to my environment so I run linux/unix "ls" when I type ls in the command prompt. That's not a problem for Powershell, apparently, but I'm not being able to create a custom alias, with both the same name (ls) or a differnt name (lsa/ll/ld), and I'm getting the following error:
The script failed due to call depth overflow.
+ CategoryInfo : InvalidOperation: (0:Int32) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CallDepthOverflow
Now, here's my Powershell script:
Set-Alias -name ls -value ListDirectory -Option AllScope
Function ListDirectory {
$Command = "ls -I ntuser\.* -I NTUSER\.*";
Invoke-Expression $Command
}
Any ideas? About the ignore files, I need them. Just to make sure, this command works just fine in good old command prompt, I'm only having problems in Powershell :(
$Command = "ls.exe -I ntuser\.* -I NTUSER\.*";