update on alias ( minor )

pull/2215/head
Doraken 2023-08-16 18:14:46 +02:00
parent e38696a0ac
commit 9591ec0668
7 changed files with 38 additions and 11 deletions

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