aliases: run `shfmt` on the whole folder
My apologies to future `git blame` hunters ♥pull/2047/head
parent
0619c19f65
commit
7c2c2a5525
|
|
@ -6,10 +6,8 @@ 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
|
||||||
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'
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,8 @@ cite 'about-alias'
|
||||||
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
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ alias dki='docker images' # List Docker images
|
||||||
alias dkrmac='docker rm $(docker ps -a -q)' # Delete all Docker containers
|
alias dkrmac='docker rm $(docker ps -a -q)' # Delete all Docker containers
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
darwin*|*bsd*|*BSD*)
|
darwin* | *bsd* | *BSD*)
|
||||||
alias dkrmui='docker images -q -f dangling=true | xargs docker rmi' # Delete all untagged Docker images
|
alias dkrmui='docker images -q -f dangling=true | xargs docker rmi' # Delete all untagged Docker images
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -19,8 +19,8 @@ case $OSTYPE in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ ! -z "$(command ls "${BASH_IT}/enabled/"{[0-9][0-9][0-9]${BASH_IT_LOAD_PRIORITY_SEPARATOR}docker,docker}.plugin.bash 2>/dev/null | head -1)" ]; then
|
if [ ! -z "$(command ls "${BASH_IT}/enabled/"{[0-9][0-9][0-9]${BASH_IT_LOAD_PRIORITY_SEPARATOR}docker,docker}.plugin.bash 2> /dev/null | head -1)" ]; then
|
||||||
# Function aliases from docker plugin:
|
# Function aliases from docker plugin:
|
||||||
alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container
|
alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container
|
||||||
alias dkrmall='docker-remove-stale-assets' # Delete all untagged images and exited containers
|
alias dkrmall='docker-remove-stale-assets' # Delete all untagged images and exited containers
|
||||||
alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image
|
alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ cite 'about-alias'
|
||||||
about-alias 'fuck/please to retry last command with sudo'
|
about-alias 'fuck/please to retry last command with sudo'
|
||||||
|
|
||||||
# Play nicely with 'thefuck' plugin
|
# Play nicely with 'thefuck' plugin
|
||||||
if ! _command_exists fuck ; then
|
if ! _command_exists fuck; then
|
||||||
alias fuck='sudo $(fc -ln -1)'
|
alias fuck='sudo $(fc -ln -1)'
|
||||||
fi
|
fi
|
||||||
alias please=fuck
|
alias please=fuck
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
cite about-alias
|
cite about-alias
|
||||||
about-alias 'general aliases'
|
about-alias 'general aliases'
|
||||||
|
|
||||||
if ls --color -d . &> /dev/null
|
if ls --color -d . &> /dev/null; then
|
||||||
then
|
|
||||||
alias ls="ls --color=auto"
|
alias ls="ls --color=auto"
|
||||||
elif ls -G -d . &> /dev/null
|
elif ls -G -d . &> /dev/null; then
|
||||||
then
|
|
||||||
alias ls='ls -G' # Compact view, show colors
|
alias ls='ls -G' # Compact view, show colors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -26,13 +24,11 @@ alias vbpf="vim ~/.bash_profile"
|
||||||
# colored grep
|
# colored grep
|
||||||
# Need to check an existing file for a pattern that will be found to ensure
|
# Need to check an existing file for a pattern that will be found to ensure
|
||||||
# that the check works when on an OS that supports the color option
|
# that the check works when on an OS that supports the color option
|
||||||
if grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null
|
if grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null; then
|
||||||
then
|
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if _command_exists gshuf
|
if _command_exists gshuf; then
|
||||||
then
|
|
||||||
alias shuf=gshuf
|
alias shuf=gshuf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -66,8 +62,7 @@ alias -- -='cd -' # Go back
|
||||||
alias h='history'
|
alias h='history'
|
||||||
|
|
||||||
# Tree
|
# Tree
|
||||||
if ! _command_exists tree
|
if ! _command_exists tree; then
|
||||||
then
|
|
||||||
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
cite 'about-alias'
|
cite 'about-alias'
|
||||||
about-alias 'kubectl aliases'
|
about-alias 'kubectl aliases'
|
||||||
|
|
||||||
function _set_pkg_aliases()
|
function _set_pkg_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'
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ alias skype='open -a Skype'
|
||||||
alias mou='open -a Mou'
|
alias mou='open -a Mou'
|
||||||
alias subl='open -a Sublime\ Text'
|
alias subl='open -a Sublime\ Text'
|
||||||
|
|
||||||
if [ -s /usr/bin/firefox ] ; then
|
if [ -s /usr/bin/firefox ]; then
|
||||||
unalias firefox
|
unalias firefox
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ about-alias 'systemd service'
|
||||||
|
|
||||||
case $OSTYPE in
|
case $OSTYPE in
|
||||||
linux*)
|
linux*)
|
||||||
# Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user
|
# Improve aliases by bringing the common root `sc|scd` + `sre` for action + `u` for user
|
||||||
alias sc='systemctl'
|
alias sc='systemctl'
|
||||||
alias scu='systemctl --user'
|
alias scu='systemctl --user'
|
||||||
alias scdr='systemctl daemon-reload'
|
alias scdr='systemctl daemon-reload'
|
||||||
|
|
@ -14,7 +14,7 @@ case $OSTYPE in
|
||||||
alias sceu='systemctl --user stop'
|
alias sceu='systemctl --user stop'
|
||||||
alias scs='systemctl start'
|
alias scs='systemctl start'
|
||||||
alias scsu='systemctl --user start'
|
alias scsu='systemctl --user start'
|
||||||
# Keeping previous aliases for a non-breaking change.
|
# Keeping previous aliases for a non-breaking change.
|
||||||
alias scue='sceu'
|
alias scue='sceu'
|
||||||
alias scus='scsu'
|
alias scus='scsu'
|
||||||
alias scur='scdru'
|
alias scur='scdru'
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
# root directories
|
# root directories
|
||||||
#
|
#
|
||||||
|
aliases/
|
||||||
docs/
|
docs/
|
||||||
hooks/
|
hooks/
|
||||||
scripts/
|
scripts/
|
||||||
|
|
@ -28,12 +29,6 @@ clean_files.txt
|
||||||
install.sh
|
install.sh
|
||||||
lint_clean_files.sh
|
lint_clean_files.sh
|
||||||
|
|
||||||
# aliases
|
|
||||||
#
|
|
||||||
aliases/available/dnf.aliases.bash
|
|
||||||
aliases/available/git.aliases.bash
|
|
||||||
aliases/available/vim.aliases.bash
|
|
||||||
|
|
||||||
# completions
|
# completions
|
||||||
#
|
#
|
||||||
completion/available/apm.completion.bash
|
completion/available/apm.completion.bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue