Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update on alias ( minor ) #2215

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ 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:
python-version: 3.8
# - 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
Expand Down
15 changes: 13 additions & 2 deletions aliases/available/apt.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -22,6 +29,10 @@ function _set_pkg_aliases() {

alias pkgfiles='dpkg --listfiles'
fi

############### Stack_TRACE_BUILDER ################
Function_PATH=$( dirname "${Function_PATH}" )
####################################################
}

_set_pkg_aliases
15 changes: 13 additions & 2 deletions aliases/available/curl.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion aliases/available/emacs.aliases.bash
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
6 changes: 4 additions & 2 deletions aliases/available/git.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion aliases/available/kubectl.aliases.bash
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion aliases/available/textmate.aliases.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# shellcheck shell=bash
about-alias 'textmate abbreviations'

case $OSTYPE in
case ${OSTYPE} in
darwin*)
# Textmate
alias e='mate . &'
Expand Down
6 changes: 4 additions & 2 deletions aliases/available/uuidgen.aliases.bash
Original file line number Diff line number Diff line change
@@ -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
Expand Down