Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] cannot open files from cmd or powershell or any terminal app #220

Closed
ghost opened this issue Oct 5, 2019 · 4 comments
Closed

[Bug] cannot open files from cmd or powershell or any terminal app #220

ghost opened this issue Oct 5, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 5, 2019

Describe the bug
opening any file doesn't work from a terminal or cmd or powershell.

To Reproduce
Steps to reproduce the behavior.

  1. Open cmd or powershell. If the file is present and called rat.txt
  2. paste notepads rat.txt in terminal.
  3. notepads opens, but the file is not opened in it.
  4. also, now the terminal is unusable. the cursor keeps blinking but nothing appears when you type text. Even, Ctrl+C doesn't work. closing the notepads window works.

Expected behavior
type notepad rat.txt , notepad opens the file. and you can continue to type other commands in the same terminal.

vscode also does something like notepad, I think. other text editors also do this basic task.

Screenshots
None.

Desktop (please complete the following information):

  • OS: Windows 10 1903
  • Version 0.10.3.0

Additional context

notepads help or notepads -h doesn't work.
similar issue for printing the version of notepads.

actually, even typing notepads in the terminal, presents the same issues. the file is not opened, terminal is unusable.

my user account is not admin, so can't change some settings. there is a admin account. and "transparency effects" are turned off.

@ghost
Copy link
Author

ghost commented Oct 5, 2019

tags: ?

code: in src directory

estimated importance: low, depends on user preference w.r.t. opening files in notepads


let me know if you want more details like

  • if you want to talk.
  • if this issue is irrelevant, in which case, close it as fast as possible.

@ghost
Copy link
Author

ghost commented Oct 5, 2019

connected issues: this functionality seems like its the foundation for #210


@trip23app

@0x7c13
Copy link
Owner

0x7c13 commented Oct 6, 2019

For opening files within CMD and PowerShell, it should work. Can you do a quick screen recording of your scenario?

Notepads "help" or "-h" is not implemented since this is not a command-line app and I do not feel a need of doing so (Same as original notepad.exe).

For answering why running Notepads command in PowerShell will "hang" or becoming "unusable" is because PowerShell runs Notepads command in the main thread and by default, it is waiting for the command to finish, in this case: it will finish after closing the app. If you run below command in PowerShell, it will run the command in a background thread:

> Start-Process -NoNewWindow Notepads

This is a behavior change brought by implementing UWP multi-instance feature. Not sure why and I can take a look later.

@ghost
Copy link
Author

ghost commented Oct 6, 2019

it works, i tried it with different files and it works flawlessly. sorry to bother you.

thanks for the app and for > Start-Process -NoNewWindow Notepads suggestion.


opened file like notepads rat.txt , also hangs after closing the notepads window. workaround is to close the powershell window.

@ghost ghost closed this as completed Oct 6, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant