237dmitry

Results 330 comments of 237dmitry
trafficstars

```console $PSStyle.Formatting is a nested object to control default formatting of debug, error, verbose, and warning messages. You can also control attributes like bolding and underlining. It replaces $Host.PrivateData as...

``` sudo setcap cap_net_raw=eip /opt/microsoft/powershell/7/pwsh # real binary, not symlink ``` And restart pwsh. To view or delete permissions: ``` getcap /opt/microsoft/powershell/7/pwsh sudo setcap -r /opt/microsoft/powershell/7/pwsh ```

> why? Why not? pwsh is my main shell in user space on Linux. bash mainly as mc subshell. ``` $ (gc .bash_history).count 377 $ (gc ./.local/share/powershell/PSReadLine/ConsoleHost_history.txt).count 12168 ```

> Expected behavior >The existing file is not deleted. ![hl](https://user-images.githubusercontent.com/78153320/202889058-1eb7085c-cbd8-42b7-9f30-e2a04d9f1a18.png)

I don't understand is this problem of pwsh or gvim or Windows? For example on linux gedit works fine: ``` Write-Output aaaa | gedit - # or Write-Output aaaa |...

Define ``` [Tuple`2[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]]``` ))))) As a workaround, this woks without type definition ```powershell function test { param ( [Parameter()] $somepair ) $somepair.GetType()...

> and I think (but haven't checked) that happens in any .NET language The same is in Windows Powershell.

> Command not found error message is shown Check if pwsh is executable ``` $ stat -c "%a %A" /opt/microsoft/powershell/7/pwsh 755 -rwxr-xr-x ```

`Test-Path` and `New-Item` are on the different spaces. Write function for your own, PowerShell give you wide possibilities.

Use `-LiteralPath` instead of `-Path` PS. I don't remember UNC path ever working in PowerShell Core, I might be wrong.