kachkaev/njt

Add support for current repo

niccai opened this issue · 4 comments

Would you consider adding support for the current repo you are in? Something similar to https://github.com/paulirish/git-open?

Hi @niccai, that's an interesting suggestion for the CLI!

Which special characters would you recommend using?

njt ~ i
njt . i
njt ! i
njt - i
...

I think there must be something instead of the package name, because otherwise njt i would get interpreted as https://www.npmjs.com/package/i

IMHO, I wouldn't mind letting git-open do the job and I can live with it, in case @niccai only talks about jumping around different pages of the remote GitHub repo of a local repo that he is in his local terminal emulator. (NOTE: I don't use git-open but instead the github/hub's browse subcommand, which offers similar behaviours.)

Having said that, it's still nice that njt supports this feature too :D

Which special characters would you recommend using?

njt ~ i
njt . i
njt ! i
njt - i
...

In the suggested options above, . seems the most natural to my eyes, as it indicates the current directory in the CLI, plus the . key should be the most accessible on any keyboard layout (which in reality I am not so sure about. I only use MBPs with the UK and US keyboard).


Thanks for creating such a lovely app 🐸 I reached to your app via the latest issue (#342 – published on 2020-06-11) of Node Weekly newsletter, which I subscribed ✌️

Yes, I was speaking of the current local repo. I like the idea of being able to reduce tools used, so having this feature would be a bonus.

Using . seems like the best suggestion.

Thanks - no worries if it doesn’t work for your project.

Thanks for sharing your thoughts @niccai and @shoichiaizawa! I just released cli v0.4.0, which supports .. It works as an alias to a package name specified in the nearest package.json file 🎉

Commit: e6e0716

Let me know if you spot any issues or of you have other ideas 😉