Always visible progress notifications when running a subshell from PowerShell terminal
See original GitHub issueSystem Details
❯ & {"### VSCode version: $(code -v)"; "`n### VSCode extensions:`n$(code --list-extensions --show-versions | Out-String)"; "`n### PSES version: $($pseditor.EditorServicesVersion)"; "`n### PowerShell version:`n$($PSVersionTable | Out-String)"}
### VSCode version: 1.49.1 58bb7b2331731bf72587010e943852e13e6fd3cf x64
### VSCode extensions:
ACharLuk.easy-cpp-projects@2.0.0
ajshort.latex-preview@0.5.1
arthurwang.vsc-prolog@0.8.23
auchenberg.vscode-browser-preview@0.6.7
Darfka.vbscript@1.0.4
dbaeumer.vscode-eslint@2.1.8
donjayamanne.githistory@0.6.11
DotJoshJohnson.xml@2.5.1
eamodio.gitlens@10.2.2
eyhn.vscode-vibrancy@1.0.9
felixrieseberg.vsc-travis-ci-status@1.1.0
formulahendry.code-runner@0.11.0
GitHub.github-vscode-theme@1.1.5
GitHub.vscode-pull-request-github@0.20.0
GrapeCity.gc-excelviewer@3.0.40
ionutvmi.reg@1.0.1
James-Yu.latex-workshop@8.13.2
k--kato.docomment@0.1.18
kevinglasson.cornflakes-linter@0.5.1
mikestead.dotenv@1.0.1
mohsen1.prettify-json@0.0.3
MS-CEINTL.vscode-language-pack-de@1.49.1
ms-dotnettools.csharp@1.23.2
ms-ossdata.vscode-postgresql@0.3.0
ms-python.python@2020.9.112786
ms-vscode-remote.remote-containers@0.140.1
ms-vscode-remote.remote-ssh@0.55.0
ms-vscode-remote.remote-ssh-edit@0.55.0
ms-vscode-remote.remote-wsl@0.44.5
ms-vscode.cpptools@1.0.1
ms-vscode.powershell@2020.6.0
nobuhito.printcode@3.0.0
openhab.openhab@0.7.0
PleasedSkin.smalltalk@0.0.1
redhat.java@0.68.0
SimonSiefke.svg-preview@2.8.3
slevesque.vscode-autohotkey@0.2.2
tht13.html-preview-vscode@0.2.5
torn4dom4n.latex-support@3.2.0
twxs.cmake@0.0.17
VisualStudioExptTeam.vscodeintellicode@1.2.10
vscjava.vscode-java-debug@0.28.0
vscjava.vscode-java-dependency@0.13.0
vscjava.vscode-java-pack@0.10.0
vscjava.vscode-java-test@0.24.2
vscjava.vscode-maven@0.24.2
xaver.clang-format@1.9.0
yzhang.markdown-all-in-one@3.3.0
znck.grammarly@0.12.5
### PSES version:
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
Steps to reproduce:
- Open a PowerShell terminal
- Type “powershell”, “wsl”, or something else
- Now your terminal is responsive and waiting for user feedback, so …
Expected Behaviour
… I would expect the PS item in the bottom bar of VS Code to display any “idle” state …
Actual Behaviour
… Instead, it shows all the time a loading icon, which can be quite confusing because I already nest some subshells the whole day, and the whole time, a “busy” state is displayed in the bottom bar.
I think this behavior should be changed. Would it be possible to detect whether the process is waiting for the stdin, and if yes, disable the loading icon?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Run command after a certain length of time has elapsed?
The long-command will be running in the background. ... and notify-send it can be used to have more visible, user friendly notifications:.
Read more >How to run a command in the background and get no output?
Show activity on this post. Run in a subshell to remove notifications and close STDOUT and STDERR: ... It works in background and...
Read more >Underwhelmed by Bash functions? Maybe you're using them ...
A recommendation for subshell functions seems like something that should be added to The Unofficial Bash Strict Mode.
Read more >Untitled
Active desktop recovery tool download, Klakson bus barong, Far cry 3 save friends, Urdang show 2012, Secteur quaternaire france. #teil 2012 golf 118tsi, ......
Read more >Getting curl to output HTTP status code? - Super User
FYI: -s = Don't show download progress, -o /dev/null = don't display the body, -w "%{http_code}" = Write http response code to stdout...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SeeminglyScience and @corbob are on the money.
Basically if you start a native command, it becomes a subprocess. That command might be
powershell.exe
running interactively or it might bechkdsk.exe
performing a long-running disk check non-interactively.From the point of view of the parent process (the integrated console), there’s no difference. Both subprocesses have access to stdio and may or may not use it. It doesn’t get signaled to say “this subprocess is interactive”. It just gets all the output the subprocess sends to stdout, and a signal when it terminates, along with the exit code.
And in all cases, the subprocess synchronously blocks PowerShell’s pipeline thread, meaning the integrated console is busy. We’ve talked a few times about decoupling them, but then you lose all the ability to supplement the completions in the editor from the console, like with
Register-ArgumentCompleter
etc.That would break the sharing of the session state. If you’re looking for just another terminal, you can add one from the drop down, you can even specify which shell to launch in vscode configuration.