From 18666e3475d3a4180d9becc03cb105fcaa6c6801 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 6 Jul 2024 18:09:04 +0800 Subject: added submodule --- dot-oh-my-zsh | 1 + dot-oh-my-zsh/plugins/github/github.plugin.zsh | 77 -------------------------- 2 files changed, 1 insertion(+), 77 deletions(-) create mode 160000 dot-oh-my-zsh delete mode 100644 dot-oh-my-zsh/plugins/github/github.plugin.zsh (limited to 'dot-oh-my-zsh/plugins/github/github.plugin.zsh') diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh new file mode 160000 index 00000000..6fe84bf5 --- /dev/null +++ b/dot-oh-my-zsh @@ -0,0 +1 @@ +Subproject commit 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8cea diff --git a/dot-oh-my-zsh/plugins/github/github.plugin.zsh b/dot-oh-my-zsh/plugins/github/github.plugin.zsh deleted file mode 100644 index 79114ff6..00000000 --- a/dot-oh-my-zsh/plugins/github/github.plugin.zsh +++ /dev/null @@ -1,77 +0,0 @@ -# Set up hub wrapper for git, if it is available; https://github.com/github/hub -if (( $+commands[hub] )); then - alias git=hub -fi - -# Functions ################################################################# - -# Based on https://github.com/dbb/githome/blob/master/.config/zsh/functions - -# empty_gh -# -# Use this when creating a new repo from scratch. -# Creates a new repo with a blank README.md in it and pushes it up to GitHub. -empty_gh() { # [NAME_OF_REPO] - emulate -L zsh - local repo=$1 - - mkdir "$repo" - touch "$repo/README.md" - new_gh "$repo" -} - -# new_gh [DIRECTORY] -# -# Use this when you have a directory that is not yet set up for git. -# This function will add all non-hidden files to git. -new_gh() { # [DIRECTORY] - emulate -L zsh - local repo="$1" - cd "$repo" \ - || return - - git init \ - || return - # add all non-dot files - print '.*'"\n"'*~' >> .gitignore - git add [^.]* \ - || return - git add -f .gitignore \ - || return - git commit -m 'Initial commit.' \ - || return - hub create \ - || return - git push -u origin master \ - || return -} - -# exist_gh [DIRECTORY] -# -# Use this when you have a git repo that's ready to go and you want to add it -# to your GitHub. -exist_gh() { # [DIRECTORY] - emulate -L zsh - local repo=$1 - cd "$repo" - - hub create \ - || return - git push -u origin master -} - -# git.io "GitHub URL" -# -# Shorten GitHub url, example: -# https://github.com/nvogel/dotzsh > https://git.io/8nU25w -# source: https://github.com/nvogel/dotzsh -# documentation: https://github.com/blog/985-git-io-github-url-shortener -# -git.io() { - # emulate -L zsh - # 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 ############################################################# - -- cgit v1.2.3