Code Monkey home page Code Monkey logo

Comments (11)

ZakariaTalhami avatar ZakariaTalhami commented on July 28, 2024 1

I also use iTerm and other terminals, and dont use much of the integrated terminals, I would also like a way to cd into the project, especially if the path to the project is quite long.

If changing directory once the project is open isnt an option now, maybe a command can be made to return the path to the project so users would be able to use:
cd $(pm dir projectName)
or just be able to copy past the path.

I think this command would be useful for other cases as well. I would be willing to implement this if you agree.

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

The first part is I guess similar to #5
The thing is it's just too hacky to implement it and don't really want to mess up the code. Also, I think almost all editors offer integrated terminal feature so I'll just leave this part to the editors.

Or even more, extend it to run npm scripts like npm start.

Can you explain more about this? I didn't exactly get it

from projectman.

francisceril avatar francisceril commented on July 28, 2024

The thing is it's just too hacky to implement it and don't really want to mess up the code. Also, I think almost all editors offer integrated terminal feature so I'll just leave this part to the editors.

I still use iTerm + Sublime  😃

Can you explain more about this? I didn't exactly get it

I use npm scripts to start my dev environment and I think most use it as well.

package.json

"scripts": {
"start": "cross-env NODE_ENV=development...
"build": "cross-env NODE_ENV=production...
},

Since the idea of this tool is to help quick start you from opening and running your project, I think it would really be nice if there's an option to run scripts rather than just opening the editor.
Although this setting should be per user and per project. Everyone has their own workflow.

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

You mean having a command like pm open <projectName> --run dev?

So everyone prefers different workflow and different setup and a lot of people I know including me will prefer the server or any npm script to be running inside the integrated terminal rather than having it on a separate terminal(so that I can just see the output in the editor itself without having to change tab)(and also I feel that this is how it should be) so I won't really recommend anyone to have their scripts running on different tab and editor on different.
and I don't really want to end up adding a command that will not be used by majority.

This feature would have been a fire if we could run the scripts inside the editor's terminal(which is not possible)

Is there anything else that you want to mention?

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

The problem with directly cd /to/the/path is there is not straight forward way to implement it on node

maybe a command can be made to return the path to the project so users would be able to use:
cd $(pm dir projectName)

This sounds great alternative and yes you can go ahead with it! Can we discuss about the command name though? pm dir, pm getdir, pm showdir, pm showpath, pm getpath which one would make more sense?

from projectman.

ZakariaTalhami avatar ZakariaTalhami commented on July 28, 2024

I would think either:

  1. getdir with alias of dir
  2. getpath with alias of path

which do you think is better?

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

I think getpath (since I am using path key in my settings too) with alias gp could save them from pressing few more keys.
What say?

from projectman.

ZakariaTalhami avatar ZakariaTalhami commented on July 28, 2024

Sounds fine to me, ill open the PR when its ready.

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

Cool thanks! also just wondering can we do cd $(pm getPath) and keep projectName as optional argument so when projectName is not passed it will open the list as it does in pm open and pm remove command and then just select the project to cd inside it?

from projectman.

ZakariaTalhami avatar ZakariaTalhami commented on July 28, 2024

I did some research and found this issue, and the solution seems to work, but the colors in my terminal in those cases dont work as expected.

from projectman.

saurabhdaware avatar saurabhdaware commented on July 28, 2024

Resolved in #9 🎉
Thank you @francisceril and @ZakariaTalhami 🌻

from projectman.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.