50550c70eaa36e79fdf380bdc4ddad4a1ad581a0
- Author
- Sukka <isukkaw@gmail.com>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(github): deprecate the `git.io` command (#10896)
Diff
1diff --git a/plugins/github/README.md b/plugins/github/README.md
2index af2b8a4e75fb2175ac042fa079faaf69f661fab2..5d8b6250182945d91c3ed6ac7e0fc0b105e716bc 100644
3--- a/plugins/github/README.md
4+++ b/plugins/github/README.md
5@@ -11,7 +11,6 @@ This plugin supports working with GitHub from the command line. It provides a fe
6 * `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub
7 * `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub
8 * `exist_gh` - Takes an existing repo and pushes it to GitHub
9-* `git.io` - Shortens a URL using [git.io](https://git.io)
10
11
12 ## Installation
13diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
14index 8e4b97352f0467fbbb10b1b44c770bd29570cb06..79114ff69b5b18ecff361f5c416bad3fa98d5f6e 100644
15--- a/plugins/github/github.plugin.zsh
16+++ b/plugins/github/github.plugin.zsh
17@@ -68,8 +68,9 @@ exist_gh() { # [DIRECTORY]
18 # documentation: https://github.com/blog/985-git-io-github-url-shortener
19 #
20 git.io() {
21- emulate -L zsh
22- curl -i -s https://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "
23+ # emulate -L zsh
24+ # curl -i -s https://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "
25+ print -u2 ${(%):-"%F{yellow}%BThe \`git.io\` is deprecated.%b\nView the announcement made by GitHub: https://github.blog/changelog/2022-01-11-git-io-no-longer-accepts-new-urls/%f"}
26 }
27
28 # End Functions #############################################################