gh-upload
This commit is contained in:
18
.config/gh/config.yml
Normal file
18
.config/gh/config.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
# The current version of the config schema
|
||||
version: 1
|
||||
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||
git_protocol: ssh
|
||||
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||
editor:
|
||||
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
|
||||
prompt: enabled
|
||||
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
|
||||
pager:
|
||||
# Aliases allow you to create nicknames for gh commands
|
||||
aliases:
|
||||
co: pr checkout
|
||||
upload: '!gh-upload'
|
||||
# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
|
||||
http_unix_socket:
|
||||
# What web browser gh should use when opening URLs. If blank, will refer to environment.
|
||||
browser:
|
||||
10
.local/bin/gh-upload
Executable file
10
.local/bin/gh-upload
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# gh-cli shortcut to upload a repo to github
|
||||
# takes an optional flag --private
|
||||
# and an optional parameter which repo should be uploaded, defaults to CWD
|
||||
if [ "$1" = "--private" ]; then
|
||||
gh repo create --push --private --source ${2-.}
|
||||
else
|
||||
gh repo create --push --public --source ${2-.}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user