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 - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.17 go-version: 1.19
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@ -52,7 +52,7 @@ jobs:
# - name: Update APT Package Lists # - name: Update APT Package Lists
# run: sudo apt-get update # run: sudo apt-get update
- name: Install shfmt - 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 - name: Install shellcheck
env: env:
scversion: stable # Or latest, vxx, etc 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.' about-alias 'Apt and dpkg aliases for Ubuntu and Debian distros.'
# set apt aliases # set apt aliases
function _set_pkg_aliases() { function _set_pkg_aliases()
if _command_exists apt; then {
############ STACK_TRACE_BUILDER #####################
Function_Name="${FUNCNAME[0]}"
Function_PATH="${Function_PATH}/${Function_Name}"
######################################################
if _command_exists apt
then
alias apts='apt-cache search' alias apts='apt-cache search'
alias aptshow='apt-cache show' alias aptshow='apt-cache show'
alias aptinst='sudo apt-get install -V' alias aptinst='sudo apt-get install -V'
@ -22,6 +29,10 @@ function _set_pkg_aliases() {
alias pkgfiles='dpkg --listfiles' alias pkgfiles='dpkg --listfiles'
fi fi
############### Stack_TRACE_BUILDER ################
Function_PATH=$( dirname "${Function_PATH}" )
####################################################
} }
_set_pkg_aliases _set_pkg_aliases

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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