1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 14:15:18 +08:00

fix(github): deprecate the git.io command (#10896)

This commit is contained in:
Sukka 2022-06-13 02:22:29 +08:00 committed by GitHub
parent 055c3b6cb3
commit 50550c70ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,6 @@ This plugin supports working with GitHub from the command line. It provides a fe
* `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub * `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub
* `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub * `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub
* `exist_gh` - Takes an existing repo and pushes it to GitHub * `exist_gh` - Takes an existing repo and pushes it to GitHub
* `git.io` - Shortens a URL using [git.io](https://git.io)
## Installation ## Installation

View File

@ -68,8 +68,9 @@ exist_gh() { # [DIRECTORY]
# documentation: https://github.com/blog/985-git-io-github-url-shortener # documentation: https://github.com/blog/985-git-io-github-url-shortener
# #
git.io() { git.io() {
emulate -L zsh # emulate -L zsh
curl -i -s https://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " " # curl -i -s https://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "
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"}
} }
# End Functions ############################################################# # End Functions #############################################################