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.'
|
||||
|
||||
# set apt aliases
|
||||
function _set_pkg_aliases()
|
||||
{
|
||||
if _command_exists apt
|
||||
then
|
||||
function _set_pkg_aliases() {
|
||||
if _command_exists apt; then
|
||||
alias apts='apt-cache search'
|
||||
alias aptshow='apt-cache show'
|
||||
alias aptinst='sudo apt-get install -V'
|
||||
|
|
|
|||
|
|
@ -4,10 +4,8 @@ cite 'about-alias'
|
|||
about-alias 'Curl aliases for convenience.'
|
||||
|
||||
# set apt aliases
|
||||
function _set_pkg_aliases()
|
||||
{
|
||||
if _command_exists curl
|
||||
then
|
||||
function _set_pkg_aliases() {
|
||||
if _command_exists curl; then
|
||||
# follow redirects
|
||||
alias cl='curl -L'
|
||||
# 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
|
||||
|
||||
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
|
||||
;;
|
||||
*)
|
||||
|
|
@ -19,8 +19,8 @@ case $OSTYPE in
|
|||
;;
|
||||
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
|
||||
# Function aliases from docker plugin:
|
||||
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:
|
||||
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 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'
|
||||
|
||||
# Play nicely with 'thefuck' plugin
|
||||
if ! _command_exists fuck ; then
|
||||
if ! _command_exists fuck; then
|
||||
alias fuck='sudo $(fc -ln -1)'
|
||||
fi
|
||||
alias please=fuck
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
cite about-alias
|
||||
about-alias 'general aliases'
|
||||
|
||||
if ls --color -d . &> /dev/null
|
||||
then
|
||||
if ls --color -d . &> /dev/null; then
|
||||
alias ls="ls --color=auto"
|
||||
elif ls -G -d . &> /dev/null
|
||||
then
|
||||
elif ls -G -d . &> /dev/null; then
|
||||
alias ls='ls -G' # Compact view, show colors
|
||||
fi
|
||||
|
||||
|
|
@ -26,13 +24,11 @@ alias vbpf="vim ~/.bash_profile"
|
|||
# colored grep
|
||||
# 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
|
||||
if grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null
|
||||
then
|
||||
if grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null; then
|
||||
alias grep='grep --color=auto'
|
||||
fi
|
||||
|
||||
if _command_exists gshuf
|
||||
then
|
||||
if _command_exists gshuf; then
|
||||
alias shuf=gshuf
|
||||
fi
|
||||
|
||||
|
|
@ -66,8 +62,7 @@ alias -- -='cd -' # Go back
|
|||
alias h='history'
|
||||
|
||||
# Tree
|
||||
if ! _command_exists tree
|
||||
then
|
||||
if ! _command_exists tree; then
|
||||
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
cite 'about-alias'
|
||||
about-alias 'kubectl aliases'
|
||||
|
||||
function _set_pkg_aliases()
|
||||
{
|
||||
function _set_pkg_aliases() {
|
||||
if _command_exists kubectl; then
|
||||
alias kc='kubectl'
|
||||
alias kcgp='kubectl get pods'
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ alias skype='open -a Skype'
|
|||
alias mou='open -a Mou'
|
||||
alias subl='open -a Sublime\ Text'
|
||||
|
||||
if [ -s /usr/bin/firefox ] ; then
|
||||
if [ -s /usr/bin/firefox ]; then
|
||||
unalias firefox
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ about-alias 'systemd service'
|
|||
|
||||
case $OSTYPE in
|
||||
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 scu='systemctl --user'
|
||||
alias scdr='systemctl daemon-reload'
|
||||
|
|
@ -14,7 +14,7 @@ case $OSTYPE in
|
|||
alias sceu='systemctl --user stop'
|
||||
alias scs='systemctl 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 scus='scsu'
|
||||
alias scur='scdru'
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
# root directories
|
||||
#
|
||||
aliases/
|
||||
docs/
|
||||
hooks/
|
||||
scripts/
|
||||
|
|
@ -28,12 +29,6 @@ clean_files.txt
|
|||
install.sh
|
||||
lint_clean_files.sh
|
||||
|
||||
# aliases
|
||||
#
|
||||
aliases/available/dnf.aliases.bash
|
||||
aliases/available/git.aliases.bash
|
||||
aliases/available/vim.aliases.bash
|
||||
|
||||
# completions
|
||||
#
|
||||
completion/available/apm.completion.bash
|
||||
|
|
|
|||
Loading…
Reference in New Issue