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

Add a terminal or menu option to open one w/in the editor #47

Open
kaosine opened this issue Sep 4, 2022 · 9 comments
Open

Add a terminal or menu option to open one w/in the editor #47

kaosine opened this issue Sep 4, 2022 · 9 comments
Labels
enhancement New feature or request help-wanted Extra attention is needed package-idea Might be good candidate for new package.

Comments

@kaosine
Copy link
Member

kaosine commented Sep 4, 2022

Summary

This probably speaks for itself, however, we need a terminal that's somehow accessible within Pulsar or as a menu option. Many plugins that were popular for this option no longer exist, and even a stopgap solution would be ideal of the "open in terminal" as a right click from the tree.

Motivation

Are there any other possible alternatives? (Is this really the best solution or only option to add this feature? Could it be a plugin?)

It could be a plugin, but until interest is drawn, I don't see that as a viable solution. There are probably many other ones we could fork as possible solutions, but that involves someone maintaining it and that could be an unknown at this point how long this will last since we've had plenty join our discord but not many speak up or show much interest in these kinds of manners. As shown in the #community-packages channel in discord, many of these have fallen into neglect since 2019 at the minimum, with many others (that may work with some tweaks) having not been touched since 2016 from the commit histories.

Additional context

This could help as productivity enhancement, even if just adding a right click menu to satisfy this goal. If not, an eventual terminal built in functioning off whatever the user default is on Linux or elsewhere. (since I personally use fish/omf and I know many go straight bash or some version of zsh)

@confused-Techie
Copy link
Member

I think our most realistic option is to have a right click menu from the left hand side file structure. This could be a simple prompt with a configurable shell to open. Attempting some autodetect based on OS. Then really it should just be able to spawn a that shell.

Personally I think this would be very helpful feature to add, but yeah might be a bit much to maintain a fully fledged shell panel at this time, but if someone has the energy I'm all for it.

@confused-Techie confused-Techie added enhancement New feature or request help-wanted Extra attention is needed package-idea Might be good candidate for new package. labels Sep 4, 2022
@kaosine
Copy link
Member Author

kaosine commented Sep 4, 2022

That's my thought process on it. Just having a right-click menu might be easy enough to implement for now and move to a more advanced solution later.

@kaosine
Copy link
Member Author

kaosine commented Sep 27, 2022

Probably need an update on this one of mine. Ought to not be too difficult to open a terminal through a right click menu if nothing else. Which that menu both in the editor views, and tree needs to be cleaned up. The split alone should be a sub-menu you have to move into imo.

@Daeraxa
Copy link
Member

Daeraxa commented Sep 27, 2022

Zed has an interesting approach for this where a terminal instance is opened in a tab just like any other file and works with splits exactly the same way. It does have a modal terminal too but I really like the super modular approach to it.

@sertonix
Copy link
Contributor

sertonix commented Oct 26, 2022

I made a small package that allows you to open a terminal: https://github.com/Sertonix/open-in-terminal
It is currently work in progress and you would most likely need to set your own start command in the settings.

@utkarsh-singh07
Copy link

Previously in atom, I was using PlatformIO terminal, and its extensibility and settings were very good, but

Somehow I cannot use it in my current fedora 37 within pulsar, but in Ubuntu 22.04 it is working perfectly , don't know why (maybe due to electron version incompatibility).

If we can integrate that project in pulsar, it would be great.

@Daeraxa
Copy link
Member

Daeraxa commented May 4, 2023

@jigyasu-singh this is a rather old issue and one that I think needs updated as I also opened a similar discussion, one of the Pulsar team is already maintaining a fork of x-terminal - https://web.pulsar-edit.dev/packages/x-terminal-reloaded - which works nicely with Pulsar (for me anyway).

@utkarsh-singh07
Copy link

Hi @Daeraxa, I had a feeling this discussion would be up somewhere, I generally raised this issue for PlatformIO terminal because it seems to integrate well with the pulsar (If in future I will start with JavaScript I will try to work on it),

Nonetheless I had also tried to install x-terminal-reloaded but faced an error similar to installing some other packages -

> [email protected] install /tmp/apm-install-dir-202345-183836-dbispu.krhy9/node_modules/platformio-ide-terminal/node_modules/node-pty-prebuilt-multiarch
> prebuild-install || node scripts/install.js


prebuild-install WARN install No prebuilt binaries found (target=12.2.3 runtime=electron arch=x64 libc= platform=linux)
(node:183995) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
Traceback (most recent call last):
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 50, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 554, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 547, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 520, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 136, in Load
    result = gyp.input.Load(build_files, default_variables, includes[:],
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2782, in Load
    LoadTargetBuildFile(build_file, data, aux_data,
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 391, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(build_file_path, data, aux_data,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 234, in LoadOneBuildFile
    build_file_contents = open(build_file_path, 'rU').read()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU' while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:365:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 6.2.12-200.fc37.x86_64
gyp ERR! command "/opt/Pulsar/resources/app/ppm/bin/node" "/opt/Pulsar/resources/app/ppm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/apm-install-dir-202345-183836-dbispu.krhy9/node_modules/platformio-ide-terminal/node_modules/node-pty-prebuilt-multiarch
gyp ERR! node -v v16.0.0
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/tmp/apm-install-dir-202345-183836-dbispu.krhy9/package.json'
npm WARN apm-install-dir-202345-183836-dbispu.krhy9 No description
npm WARN apm-install-dir-202345-183836-dbispu.krhy9 No repository field.
npm WARN apm-install-dir-202345-183836-dbispu.krhy9 No README data
npm WARN apm-install-dir-202345-183836-dbispu.krhy9 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/utkarsh/.pulsar/.apm/_logs/2023-05-05T03_47_44_704Z-debug.log

@Daeraxa
Copy link
Member

Daeraxa commented May 5, 2023

@jigyasu-singh Could you maybe move this to a new thread on Discussions or to Discord as this sort of conversation shouldn't be in an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help-wanted Extra attention is needed package-idea Might be good candidate for new package.
Projects
None yet
Development

No branches or pull requests

5 participants