-
Notifications
You must be signed in to change notification settings - Fork 269
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
Can cooperate with Atom Terminals (allows inputs) #2337
base: master
Are you sure you want to change the base?
Conversation
lib/runtime.js
Outdated
|
||
// Will cooperate with Terminus to allow for inputs, if user has installed. | ||
try { | ||
var terminus = require('../../terminus/lib/terminus.js').provideTerminus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should consume the terminusTerminal
service to get the terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for that matter there should be a standard terminal
service that all terminals can provide to allow running in any terminal package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have started creating PRs for terminal packages to provide the terminal
service.
bus-stop/x-terminal#236
bus-stop/terminus#177
more to come...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make a PR fixing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still in works? It doesn't seem to be implemented in the actual release
"^1.1.0": "consumeTerminal" | ||
} | ||
}, | ||
"terminal": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allow almost any terminal including old ones that haven't been updated in a while. If we only want currently maintained terminals we can just consume terminal
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't hurt to support them if this doesn't break other things. Regarding package curation, I have some good plans which will solve many issues.
Merging requires squashing and using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get this error
❯ printf "\33c\e[3J" && cmd "/c C:\Users\aminy\Documents\GitHub\JavaScript\@atom-ide-community\atom-script\node_modules\.bin\babel.cmd --filename C:\Users
\aminy\Documents\GitHub\JavaScript\@atom-ide-community\atom-script\examples\modern.js --config-file C:\Users\aminy\Documents\GitHub\JavaScript\@atom-ide-c
ommunity\atom-script\lib\grammars\babel.config.js < C:\Users\aminy\Documents\GitHub\JavaScript\@atom-ide-community\atom-script\examples\modern.js| node"
printf: The term 'printf' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a terminal is not already open nothing happens. We should fall back to the original method in these cases
Co-authored-by: Tony Brix <[email protected]>
It seems it is fixed. But not sure why it was happening. I hope it isn't a random bug in the terminal service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The terminal package doesn't scroll to the last output if you scroll upwards intentionally.
for (let i = 0; i < commandContext.args.length; i++) { | ||
command += ` "${commandContext.args[i]}"` | ||
} | ||
terminal.run([command]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to make sure that this has successfully run?
To solve a common 'problem' seen by users regarding inputs not working, send commands from Script to Terminus to run rather than Atom's Buffered Process. Code is run in Terminus' internal terminal window and allows for Input (If Terminus not installed, returns to default behavior).
Originally posted by @Kacarott in #2237