pull/2215/merge
Doraken 2023-08-16 18:36:20 +02:00 committed by GitHub
commit a48c03ae5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 13 deletions

View File

@ -44,7 +44,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.19
- name: Set up Python
uses: actions/setup-python@v2
with:
@ -52,7 +52,7 @@ jobs:
# - name: Update APT Package Lists
# run: sudo apt-get update
- name: Install shfmt
run: GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Install shellcheck
env:
scversion: stable # Or latest, vxx, etc

View File

@ -6,8 +6,15 @@ cite 'about-alias'
about-alias 'Apt and dpkg aliases for Ubuntu and Debian distros.'
# set apt aliases
function _set_pkg_aliases() {
if _command_exists apt; then
function _set_pkg_aliases()
{
############ STACK_TRACE_BUILDER #####################
Function_Name="${FUNCNAME[0]}"
Function_PATH="${Function_PATH}/${Function_Name}"
######################################################
if _command_exists apt
then
alias apts='apt-cache search'
alias aptshow='apt-cache show'
alias aptinst='sudo apt-get install -V'
@ -22,6 +29,10 @@ function _set_pkg_aliases() {
alias pkgfiles='dpkg --listfiles'
fi
############### Stack_TRACE_BUILDER ################
Function_PATH=$( dirname "${Function_PATH}" )
####################################################
}
_set_pkg_aliases

View File

@ -2,8 +2,15 @@
about-alias 'Curl aliases for convenience.'
# set apt aliases
function _set_pkg_aliases() {
if _command_exists curl; then
function _set_pkg_aliases()
{
############ STACK_TRACE_BUILDER #####################
Function_Name="${FUNCNAME[0]}"
Function_PATH="${Function_PATH}/${Function_Name}"
######################################################
if _command_exists curl
then
# follow redirects
alias cl='curl -L'
# follow redirects, download as original name
@ -17,6 +24,10 @@ function _set_pkg_aliases() {
# see only response headers from a get request
alias clhead='curl -D - -so /dev/null'
fi
############### Stack_TRACE_BUILDER ################
Function_PATH=$( dirname "${Function_PATH}" )
####################################################
}
_set_pkg_aliases

View File

@ -1,7 +1,7 @@
# shellcheck shell=bash
about-alias 'emacs editor'
case $OSTYPE in
case ${OSTYPE} in
linux*)
alias em='emacs'
alias en='emacs -nw'

View File

@ -199,11 +199,13 @@ case $OSTYPE in
esac
# functions
function gdv() {
function gdv()
{
git diff --ignore-all-space "$@" | vim -R -
}
function get_default_branch() {
function get_default_branch()
{
if git branch | grep -q '^. main\s*$'; then
echo main
else

View File

@ -1,7 +1,8 @@
# shellcheck shell=bash
about-alias 'kubectl aliases'
if _command_exists kubectl; then
if _command_exists kubectl
then
alias kc='kubectl'
alias kcgp='kubectl get pods'
alias kcgd='kubectl get deployments'

View File

@ -1,7 +1,7 @@
# shellcheck shell=bash
about-alias 'textmate abbreviations'
case $OSTYPE in
case ${OSTYPE} in
darwin*)
# Textmate
alias e='mate . &'

View File

@ -1,10 +1,12 @@
# shellcheck shell=bash
about-alias 'uuidgen aliases'
if _command_exists uuid; then # Linux
if _command_exists uuid
then # Linux
alias uuidu="uuid | tr '[:lower:]' '[:upper:]'"
alias uuidl=uuid
elif _command_exists uuidgen; then # macOS/BSD
elif _command_exists uuidgen
then # macOS/BSD
alias uuidu="uuidgen"
alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" # because upper case is like YELLING
alias uuidl=uuid