Skip to content

gh browse opens relative to terminal location #3952

@bchadwic

Description

@bchadwic

Describe the feature or problem you’d like to solve

assuming cli is the root of the local repo
current functionality:

C:\Users\User\Desktop\cli\pkg\cmd\browse> gh browse pkg\cmd\browse\browse.go

This seemed like a lot of typing for a directory I am already in

Proposed solution

relative path starts with "\"

C:\Users\User\Desktop\cli\pkg\cmd\browse> gh browse \browse.go

absolute starts with folder or file name

C:\Users\User\Desktop\cli\pkg\cmd\browse> gh browse api\cache.go

Additional context

Not sure if this is possible given the current code, but I found this which may help

C:\Users\User\Desktop\cli\pkg\cmd\browse> git rev-parse --show-prefix
pkg/cmd/browse/

Metadata

Metadata

Assignees

Labels

enhancementa request to improve CLIhelp wantedContributions welcome

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions