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

Detecting Node and Go environments with package.json and go.mod #165

Closed
FlomoN opened this issue Nov 17, 2020 · 2 comments
Closed

Detecting Node and Go environments with package.json and go.mod #165

FlomoN opened this issue Nov 17, 2020 · 2 comments
Labels
🤩 enhancement Improvement of a feature

Comments

@FlomoN
Copy link

FlomoN commented Nov 17, 2020

Prerequisites

  • [x ] I have read and understand the CONTRIBUTING guide
  • [x ] I looked for duplicate issues before submitting this one

Description

Right now the node segment and go segment, simply scan the files in the current directory for .js/ts or .go files. Usually I have my terminal open in the root folder of the project, where my package.json resides and start scripts or install packages from there. Usually though i dont have any source (.js/.ts) files in there, but rather have them in a separate src folder.
(Similar concepts apply for go, with other programming languages im not sure).

So I would suggest to scan for an existing package.json file or node_modules folder for a node environment.
For go i would suggest scanning for go.mod file.

(PS: I see that you dont have such a folder structure in this project, and therefore might think this is unecessary, but im pretty sure its very common to not have source files in the root folder. Dont want to step on your toes tho)

Environment

  • Oh my Posh version: 3.36.1
  • Theme: Custom
  • Operating System: Windows
  • Shell: Powershell
  • Terminal: Any
@JanDeDobbeleer
Copy link
Owner

My toes can handle a beating after being in OSS for a while, so don't worry 😂. I'll add this functionality, it's literally almost no work due to a refactor I did last week.

@JanDeDobbeleer JanDeDobbeleer added the 🤩 enhancement Improvement of a feature label Nov 17, 2020
@FlomoN
Copy link
Author

FlomoN commented Nov 17, 2020

Great stuff :) Love the new look of my powershell, thanks to your project, great work

JanDeDobbeleer added a commit that referenced this issue Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤩 enhancement Improvement of a feature
Projects
None yet
Development

No branches or pull requests

2 participants