Comments (4)
Hey, thanks for the bug report.
If you provide the full URL including protocol then that will override your configured git_protocol
. I've created a PR here that documents this behaviour: #9030, could you have a look and tell me if it makes sense?
from cli.
Thanks William. IMO, the URL form https://github.com/xxx/yyy
should respect git_protocol
. If you want to explicitly use https protocol, it's possible to use the "real" HTTPS URL, https://github.com/xxx/yyy.git
.
My use case is that I'd like to easily copy and paste URLs from my web browser into my terminal, and have git_protocol
respected.
from cli.
I hear you. That might be a reasonable approach but unfortunately this has been the behaviour since the command was first introduced and changing it would be backwards incompatible.
The best thing I can suggest is that you use a gh
alias like so:
gh alias set --shell repo-clone 'gh repo clone ${1#https://github.com/}'
This performs a shell parameter expansion to remove https://github.com
. Then you can call:
gh repo-clone https://github.com/xxx/yyy
and it will functionally act as:
gh repo clone xxx/yyy
from cli.
I've updated the title and labels to better reflect your request and updated the docs in #9030 to make it clear what the current behaviour is.
from cli.
Related Issues (20)
- `panic: reflect: call of reflect.Value.Interface on zero Value` when `gh pr view --json stateReason` HOT 1
- Create issue with assignee login prefixed with `@` fails repeatedly HOT 1
- Cannot use fine-grained PATs to add labels to pull requests HOT 12
- Add a --latest flag to `gh run download` HOT 1
- Add a --wait flag to `gh run download`
- Delete caches by pattern
- Copilot Chinese Support HOT 2
- Support JSON File as Input for `gh label create`
- Move Windows distribution signing to workflow, conditionalize on environment
- `gh gist edit` should be pipeable
- Include reaction details, complimenting `--interaction` flag use in `gh search`
- Can Github provide i18n support HOT 2
- Piping `gh pr list -A ...` changes its output HOT 2
- Removing reviewers does not always work HOT 2
- Provide reporting on the OSS health of `cli/cli`
- Attestation Verification Buffer Size
- add in-line comment reminder in "gh pr status"
- `git pr create --dry-run` works with remote branch but actual command does not
- Document pr checks `bucket` field
- Make it easier to filter out workflowName, stepName, and timestamps when running gh run view --log | --log-failed --job=@@ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.