diff --git a/.config/gh/config.yml b/.config/gh/config.yml new file mode 100644 index 0000000..8c79b98 --- /dev/null +++ b/.config/gh/config.yml @@ -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: diff --git a/.local/bin/gh-upload b/.local/bin/gh-upload new file mode 100755 index 0000000..8dcb78b --- /dev/null +++ b/.local/bin/gh-upload @@ -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 +