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

Open current directory or given file in repo on github #706

Closed
bengoism opened this issue Mar 27, 2020 · 3 comments
Closed

Open current directory or given file in repo on github #706

bengoism opened this issue Mar 27, 2020 · 3 comments
Labels
enhancement a request to improve CLI

Comments

@bengoism
Copy link

I quite often want to showcase/share code on github with other developers. However in my workflow its much more convenient for me to locate a file or directory I want to share in my local development environment. therefore it would be great if I could open the current directory or a given file on github through the CLI

There will be some edge cases that needs to be covered in this feature since the local branch might not be pushed yet etc

@mislav mislav added the enhancement a request to improve CLI label Mar 27, 2020
@mislav
Copy link
Contributor

mislav commented Mar 27, 2020

Hi thank you for writing in!

Right now we have a command to open the home page of the current repository in the browser: gh repo view. But if I understand, you need something more specific, right?

To clarify some of your requests:

How much of this maps to our existing rough plans for a top-level "view" command? #217

@bengoism
Copy link
Author

bengoism commented Mar 27, 2020

yes your clarifications align with what I meant :). I think the functionality Im after will be covered if @sindresorhus suggestion will supported #217 (comment)

an additional feature that I think would be useful would be to open the working directory if no arguments are provided to gh view or maybe it should just accept directories as arguments and opening the current one would just be gh view .

if the branch doesn't exist remotely I think an error message would suffice. maybe you could fallback to master if the file exists there but ofc makes the implementation a bit more complex on your end.

@bengoism
Copy link
Author

Ill add my comment to #217, so you can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to improve CLI
Projects
None yet
Development

No branches or pull requests

2 participants