I've been trying to get autocomplete suggestions for `PSIsContainer` while using PowerShell, but it seems like this property is hidden. Does anyone know why it might not be appearing in the completion list?
4 Answers
It's just one of those properties marked as hidden. It exists on the object, but some contexts, like the Foreach-Object properties, don't show note properties added by providers. This is similar to how properties like PSPath and PSProvider work. They seem to be there mainly for cmdlets to handle objects seamlessly, regardless of how each provider names their items.
I managed to get it to work by navigating to my desktop and using `Get-ChildItem`. When I accessed the property directly (like `$a[1].PSIsContainer`), it showed up for me. Are you trying it in a different way? What exactly are you doing that isn't working?
The reason you're not seeing it is that `PSIsContainer` is a property added by the provider system, which the type inference doesn't seem to recognize. If you're interested in having this fixed, you might want to report it on GitHub.
I noticed it doesn't autocomplete when you link it to an expression, like in `(gi .dir).psiscontainer`. Maybe that's a factor in your case?
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically