add bash-it

This commit is contained in:
2022-05-05 22:20:02 +02:00
parent 6a62a35d0d
commit 43701f0590
490 changed files with 33047 additions and 0 deletions
@@ -0,0 +1,12 @@
# shellcheck shell=bash
about-alias 'the silver searcher (ag) aliases'
## Summary for args to less:
# less(1)
# -M (-M or --LONG-PROMPT) Prompt very verbosely
# -I (-I or --IGNORE-CASE) Searches with '/' ignore case
# -R (-R or --RAW-CONTROL-CHARS) For handling ANSI colors
# -F (-F or --quit-if-one-screen) Auto exit if <1 screen
# -X (-X or --no-init) Disable termcap init & deinit
alias ag='ag --smart-case --pager="less -MIRFX"'
@@ -0,0 +1,5 @@
# shellcheck shell=bash
about-alias 'ansible abbreviations'
alias ans=ansible
alias ap=ansible-playbook
@@ -0,0 +1,27 @@
# shellcheck shell=bash
#
# -binaryanomaly
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
alias apts='apt-cache search'
alias aptshow='apt-cache show'
alias aptinst='sudo apt-get install -V'
alias aptupd='sudo apt-get update'
alias aptupg='sudo apt-get dist-upgrade -V && sudo apt-get autoremove'
alias aptupgd='sudo apt-get update && sudo apt-get dist-upgrade -V && sudo apt-get autoremove'
alias aptrm='sudo apt-get remove'
alias aptpurge='sudo apt-get remove --purge'
alias chkup='/usr/lib/update-notifier/apt-check -p --human-readable'
alias chkboot='cat /var/run/reboot-required'
alias pkgfiles='dpkg --listfiles'
fi
}
_set_pkg_aliases
@@ -0,0 +1,7 @@
# shellcheck shell=bash
about-alias 'Atom.io editor abbreviations'
alias a='atom'
alias ah='atom .'
alias apmup='apm update --no-confirm'
alias apmi='apm install'
@@ -0,0 +1,23 @@
# shellcheck shell=bash
about-alias 'Aliases for the bash-it command (these aliases are automatically included with the "general" aliases)'
# Common misspellings of bash-it
alias shit='bash-it'
alias batshit='bash-it'
alias bashit='bash-it'
alias batbsh='bash-it'
alias babsh='bash-it'
alias bash_it='bash-it'
alias bash_ti='bash-it'
# Additional bash-it aliases for help/show
alias bshsa='bash-it show aliases'
alias bshsc='bash-it show completions'
alias bshsp='bash-it show plugins'
alias bshha='bash-it help aliases'
alias bshhc='bash-it help completions'
alias bshhp='bash-it help plugins'
alias bshsch="bash-it search"
alias bshenp="bash-it enable plugin"
alias bshena="bash-it enable alias"
alias bshenc="bash-it enable completion"
@@ -0,0 +1,8 @@
# shellcheck shell=bash
about-alias 'puppet bolt aliases'
# Aliases
alias bolt='bolt command run --tty --no-host-key-check'
alias boltas='bolt -p -u'
alias sudobolt='bolt --run-as root --sudo-password'
alias sudoboltas='sudobolt -p -u'
@@ -0,0 +1,9 @@
# shellcheck shell=bash
about-alias 'ruby bundler'
# Bundler Commands
alias be='bundle exec'
alias bi='bundle install'
alias bl='bundle list'
alias bu='bundle update'
alias bp='bundle package'
@@ -0,0 +1,16 @@
# shellcheck shell=bash
about-alias 'xclip shortcuts'
alias pbcopy="xclip -selection clipboard"
alias pbpaste="xclip -selection clipboard -o"
alias xcpy="xclip -selection clipboard"
alias xpst="xclip -selection clipboard -o"
# to use it just install xclip on your distribution and it would work like:
# $ echo "hello" | xcpy
# $ xpst
# hello
# very useful for things like:
# cat ~/.ssh/id_rsa.pub | xcpy
# have fun!
@@ -0,0 +1,39 @@
# shellcheck shell=bash
about-alias 'common composer abbreviations'
# Aliases
alias coab='composer about'
alias coar='composer archive'
alias cob='composer browser'
alias cocpr='composer check-platform-reqs'
alias cocc='composer clear-cache'
alias cocfg='composer config'
alias cocp='composer create-project'
alias codp='composer depends'
alias codiag='composer diagnose'
alias codmp='composer dump-autoload'
alias coex='composer exec'
alias coglob='composer global'
alias coh='composer help'
alias cohome='composer home'
alias coi='composer install'
alias coinf='composer info'
alias coini='composer init'
alias coli='composer license'
alias colis='composer list'
alias coout='composer outdated'
alias cop='composer prohibits'
alias corem='composer remove'
alias coreq='composer require'
alias coreqd='composer require --dev'
alias cors='composer run-script'
alias cos='composer search'
alias cosu='composer self-update'
alias coshow='composer show'
alias costat='composer status'
alias cosugg='composer suggest'
alias coup='composer update'
alias coupg='composer upgrade'
alias coval='composer validate'
alias cowhy='composer why'
alias cowhyn='composer why-not'
@@ -0,0 +1,22 @@
# shellcheck shell=bash
about-alias 'Curl aliases for convenience.'
# set apt aliases
function _set_pkg_aliases() {
if _command_exists curl; then
# follow redirects
alias cl='curl -L'
# follow redirects, download as original name
alias clo='curl -L -O'
# follow redirects, download as original name, continue
alias cloc='curl -L -C - -O'
# follow redirects, download as original name, continue, retry 5 times
alias clocr='curl -L -C - -O --retry 5'
# follow redirects, fetch banner
alias clb='curl -L -I'
# see only response headers from a get request
alias clhead='curl -D - -so /dev/null'
fi
}
_set_pkg_aliases
@@ -0,0 +1,17 @@
# shellcheck shell=bash
about-alias 'dnf aliases for fedora 22+ distros'
alias dnfl="dnf list" # List packages
alias dnfli="dnf list installed" # List installed packages
alias dnfgl="dnf grouplist" # List package groups
alias dnfmc="dnf makecache" # Generate metadata cache
alias dnfp="dnf info" # Show package information
alias dnfs="dnf search" # Search package
alias dnfu="sudo dnf upgrade" # Upgrade package
alias dnfi="sudo dnf install" # Install package
alias dnfri='sudo dnf reinstall' # Reinstall package
alias dnfgi="sudo dnf groupinstall" # Install package group
alias dnfr="sudo dnf remove" # Remove package
alias dnfgr="sudo dnf groupremove" # Remove package group
alias dnfc="sudo dnf clean all" # Clean cache
@@ -0,0 +1,10 @@
# shellcheck shell=bash
about-alias 'docker-compose abbreviations'
alias dco="docker-compose"
# Defined in the `docker-compose` plugin, please check there for details.
alias dcofresh="docker-compose-fresh"
alias dcol="docker-compose logs -f --tail 100"
alias dcou="docker-compose up"
alias dcouns="dcou --no-start"
@@ -0,0 +1,43 @@
# shellcheck shell=bash
about-alias 'docker abbreviations'
alias dk='docker'
alias dklc='docker ps -l' # List last Docker container
alias dklcid='docker ps -l -q' # List last Docker container ID
alias dklcip='docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -l -q)' # Get IP of last Docker container
alias dkps='docker ps' # List running Docker containers
alias dkpsa='docker ps -a' # List all Docker containers
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*)
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 -r docker rmi' # Delete all untagged Docker images
;;
esac
if _bash-it-component-item-is-enabled plugin docker; 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
alias dkrmi='docker-remove-images' # Delete images for supplied IDs or all if no IDs are passed as arguments
alias dkideps='docker-image-dependencies' # Output a graph of image dependencies using Graphiz
alias dkre='docker-runtime-environment' # List environmental variables of the supplied image ID
fi
alias dkelc='docker exec -it $(dklcid) bash --login' # Enter last container (works with Docker 1.3 and above)
alias dkrmflast='docker rm -f $(dklcid)'
alias dkbash='dkelc'
alias dkex='docker exec -it ' # Useful to run any commands into container without leaving host
alias dkri='docker run --rm -i '
alias dkric='docker run --rm -i -v $PWD:/cwd -w /cwd '
alias dkrit='docker run --rm -it '
alias dkritc='docker run --rm -it -v $PWD:/cwd -w /cwd '
# Added more recent cleanup options from newer docker versions
alias dkip='docker image prune -a -f'
alias dkvp='docker volume prune -f'
alias dksp='docker system prune -a -f'
@@ -0,0 +1,16 @@
# shellcheck shell=bash
about-alias 'emacs editor'
case $OSTYPE in
linux*)
alias em='emacs'
alias en='emacs -nw'
alias e='emacsclient -n'
alias et='emacsclient -t'
alias ed='emacs --daemon'
alias E='SUDO_EDITOR=emacsclient sudo -e'
;;
darwin*)
alias em='open -a emacs'
;;
esac
@@ -0,0 +1,10 @@
# shellcheck shell=bash
about-alias 'fuck/please to retry last command with sudo'
# Play nicely with 'thefuck' plugin
if ! _command_exists fuck; then
alias fuck='sudo $(fc -ln -1)'
fi
alias please=fuck
alias plz=please
alias fucking=sudo
@@ -0,0 +1,96 @@
# shellcheck shell=bash
about-alias 'general aliases'
if command ls --color -d . &> /dev/null; then
alias ls='ls --color=auto'
# BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set.
fi
# List directory contents
alias sl=ls
alias la='ls -AF' # Compact view, show hidden
alias ll='ls -al'
alias l='ls -a'
alias l1='ls -1'
alias lf='ls -F'
alias _='sudo'
# Shortcuts to edit startup files
alias vbrc='${VISUAL:-vim} ~/.bashrc'
alias vbpf='${VISUAL:-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 command grep --color=auto "a" "${BASH_IT?}"/*.md &> /dev/null; then
alias grep='grep --color=auto'
fi
if _command_exists gshuf; then
alias shuf=gshuf
fi
alias c='clear'
alias cls='clear'
alias edit='${EDITOR:-${ALTERNATE_EDITOR:-nano}}'
alias pager='${PAGER:=less}'
alias q='exit'
alias irc='${IRC_CLIENT:=irc}'
# Language aliases
alias rb='ruby'
alias py='python'
alias ipy='ipython'
# Pianobar can be found here: http://github.com/PromyLOPh/pianobar/
alias piano='pianobar'
alias ..='cd ..' # Go up one directory
alias cd..='cd ..' # Common misspelling for going up one directory
alias ...='cd ../..' # Go up two directories
alias ....='cd ../../..' # Go up three directories
alias -- -='cd -' # Go back
# Shell History
alias h='history'
# Tree
if ! _command_exists tree; then
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
fi
# Directory
alias md='mkdir -p'
alias rd='rmdir'
# Shorten extract
alias xt='extract'
# sudo editors
alias svim='sudo ${VISUAL:-vim}'
alias snano='sudo nano'
# Display whatever file is regular file or folder
function catt() {
for i in "$@"; do
if [[ -d "$i" ]]; then
ls "$i"
else
cat "$i"
fi
done
}
# The Bash-it aliases were moved to the `bash-it.aliases.bash` file. The intent of this
# is to keep the script readable and less bloated. If you don't need to use
# the `general` aliases, but you want the Bash-it aliases, you can disable the `general`
# aliases and enable just the ones for Bash-it explicitly:
# bash-it disable alias general
# bash-it enable alias bash-it
# shellcheck source-path=SCRIPTDIR
source "$BASH_IT/aliases/available/bash-it.aliases.bash"
@@ -0,0 +1,207 @@
# shellcheck shell=bash
about-alias 'common git abbreviations'
alias g='git'
alias get='git'
# add
alias ga='git add'
alias gall='git add -A'
alias gap='git add -p'
# branch
alias gb='git branch'
alias gbD='git branch -D'
alias gba='git branch -a'
alias gbd='git branch -d'
alias gbm='git branch -m'
alias gbt='git branch --track'
alias gdel='git branch -D'
# for-each-ref
alias gbc='git for-each-ref --format="%(authorname) %09 %(if)%(HEAD)%(then)*%(else)%(refname:short)%(end) %09 %(creatordate)" refs/remotes/ --sort=authorname DESC' # FROM https://stackoverflow.com/a/58623139/10362396
# commit
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gcaa='git commit -a --amend -C HEAD' # Add uncommitted and unstaged changes to the last commit
alias gcam='git commit -v -am'
alias gcamd='git commit --amend'
alias gcm='git commit -v -m'
alias gci='git commit --interactive'
alias gcsam='git commit -S -am'
# checkout
alias gcb='git checkout -b'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcobu='git checkout -b ${USER}/'
alias gcom='git checkout $(get_default_branch)'
alias gcpd='git checkout $(get_default_branch); git pull; git branch -D'
alias gct='git checkout --track'
# clone
alias gcl='git clone'
# clean
alias gclean='git clean -fd'
# cherry-pick
alias gcp='git cherry-pick'
alias gcpx='git cherry-pick -x'
# diff
alias gd='git diff'
alias gds='git diff --staged'
alias gdt='git difftool'
# archive
alias gexport='git archive --format zip --output'
# fetch
alias gf='git fetch --all --prune'
alias gft='git fetch --all --prune --tags'
alias gftv='git fetch --all --prune --tags --verbose'
alias gfv='git fetch --all --prune --verbose'
alias gmu='git fetch origin -v; git fetch upstream -v; git merge upstream/$(get_default_branch)'
alias gup='git fetch && git rebase'
# log
alias gg='git log --graph --pretty=format:'\''%C(bold)%h%Creset%C(magenta)%d%Creset %s %C(yellow)<%an> %C(cyan)(%cr)%Creset'\'' --abbrev-commit --date=relative'
alias ggf='git log --graph --date=short --pretty=format:'\''%C(auto)%h %Cgreen%an%Creset %Cblue%cd%Creset %C(auto)%d %s'\'''
alias ggs='gg --stat'
alias ggup='git log --branches --not --remotes --no-walk --decorate --oneline' # FROM https://stackoverflow.com/questions/39220870/in-git-list-names-of-branches-with-unpushed-commits
alias gll='git log --graph --pretty=oneline --abbrev-commit'
alias gnew='git log HEAD@{1}..HEAD@{0}' # Show commits since last pull, see http://blogs.atlassian.com/2014/10/advanced-git-aliases/
alias gwc='git whatchanged'
# ls-files
alias gu='git ls-files . --exclude-standard --others' # Show untracked files
alias glsut='gu'
alias glsum='git diff --name-only --diff-filter=U' # Show unmerged (conflicted) files
# gui
alias ggui='git gui'
# home
alias ghm='cd "$(git rev-parse --show-toplevel)"' # Git home
# appendage to ghm
if ! _command_exists gh; then
alias gh='ghm'
fi
# merge
alias gm='git merge'
# mv
alias gmv='git mv'
# patch
alias gpatch='git format-patch -1'
# push
alias gp='git push'
alias gpd='git push --delete'
alias gpf='git push --force'
alias gpo='git push origin HEAD'
alias gpom='git push origin $(get_default_branch)'
alias gpu='git push --set-upstream'
alias gpunch='git push --force-with-lease'
alias gpuo='git push --set-upstream origin'
alias gpuoc='git push --set-upstream origin $(git symbolic-ref --short HEAD)'
# pull
alias gl='git pull'
alias glum='git pull upstream $(get_default_branch)'
alias gpl='git pull'
alias gpp='git pull && git push'
alias gpr='git pull --rebase'
# remote
alias gr='git remote'
alias gra='git remote add'
alias grv='git remote -v'
# rm
alias grm='git rm'
# rebase
alias grb='git rebase'
alias grbc='git rebase --continue'
alias grm='git rebase $(get_default_branch)'
alias grmi='git rebase $(get_default_branch) -i'
alias grma='GIT_SEQUENCE_EDITOR=: git rebase $(get_default_branch) -i --autosquash'
alias gprom='git fetch origin $(get_default_branch) && git rebase origin/$(get_default_branch) && git update-ref refs/heads/$(get_default_branch) origin/$(get_default_branch)' # Rebase with latest remote
# reset
alias gus='git reset HEAD'
alias gpristine='git reset --hard && git clean -dfx'
# status
alias gs='git status'
alias gss='git status -s'
# shortlog
alias gcount='git shortlog -sn'
alias gsl='git shortlog -sn'
# show
alias gsh='git show'
# svn
alias gsd='git svn dcommit'
alias gsr='git svn rebase' # Git SVN
# stash
alias gst='git stash'
alias gstb='git stash branch'
alias gstd='git stash drop'
alias gstl='git stash list'
alias gstp='git stash pop' # kept due to long-standing usage
alias gstpo='git stash pop' # recommended for it's symmetry with gstpu (push)
## 'stash push' introduced in git v2.13.2
alias gstpu='git stash push'
alias gstpum='git stash push -m'
## 'stash save' deprecated since git v2.16.0, alias is now push
alias gsts='git stash push'
alias gstsm='git stash push -m'
# submodules
alias gsu='git submodule update --init --recursive'
# switch
# these aliases requires git v2.23+
alias gsw='git switch'
alias gswc='git switch --create'
alias gswm='git switch $(get_default_branch)'
alias gswt='git switch --track'
# tag
alias gt='git tag'
alias gta='git tag -a'
alias gtd='git tag -d'
alias gtl='git tag -l'
case $OSTYPE in
darwin*)
alias gtls="git tag -l | gsort -V"
;;
*)
alias gtls='git tag -l | sort -V'
;;
esac
# functions
function gdv() {
git diff --ignore-all-space "$@" | vim -R -
}
function get_default_branch() {
if git branch | grep -q '^. main\s*$'; then
echo main
else
echo master
fi
}
@@ -0,0 +1,7 @@
# shellcheck shell=bash
about-alias 'common git-svn abbreviations'
# Aliases
alias gsr='git svn rebase'
alias gsc='git svn dcommit'
alias gsi='git svn info'
@@ -0,0 +1,34 @@
# shellcheck shell=bash
about-alias 'heroku task abbreviations'
# heroku
alias h='heroku'
alias hl='heroku list'
alias hi='heroku info'
alias ho='heroku open'
# dynos and workers
alias hd='heroku dynos'
alias hw='heroku workers'
# rake console
alias hr='heroku rake'
alias hcon='heroku console'
# new and restart
alias hnew='heroku create'
alias hrestart='heroku restart'
# logs
alias hlog='heroku logs'
alias hlogs='heroku logs'
# maint
alias hon='heroku maintenance:on'
alias hoff='heroku maintenance:off'
# heroku configs
alias hc='heroku config'
alias hca='heroku config:add'
alias hcr='heroku config:remove'
alias hcc='heroku config:clear'
@@ -0,0 +1,6 @@
# shellcheck shell=bash
about-alias 'mercurial abbreviations'
alias hs='hg status'
alias hsum='hg summary'
alias hcm='hg commit -m'
@@ -0,0 +1,11 @@
# shellcheck shell=bash
about-alias 'Some aliases for Homebrew Cask'
alias bcin='brew cask install'
alias bcrm='brew cask uninstall'
alias bczp='brew cask zap'
alias bccl='brew cask cleanup'
alias bcls='brew cask list'
alias bcinf='brew cask info'
alias bcdr='brew cask doctor'
alias bced='brew cask edit'
@@ -0,0 +1,13 @@
# shellcheck shell=bash
about-alias 'Some aliases for Homebrew'
alias bup='brew update && brew upgrade'
alias bout='brew outdated'
alias bin='brew install'
alias brm='brew uninstall'
alias bcl='brew cleanup'
alias bls='brew list'
alias bsr='brew search'
alias binf='brew info'
alias bdr='brew doctor'
alias bed='brew edit'
@@ -0,0 +1,23 @@
# shellcheck shell=bash
about-alias 'homesick aliases'
# Aliases
alias sikhm="homesick cd dotfiles"
alias sikclone="homesick clone"
alias sikcomt="homesick commit dotfiles"
alias sikdstry="homesick destroy"
alias sikdif="homesick diff dotfiles"
alias sikexec="homesick exec dotfiles"
alias sikexeca="homesick exec_all"
alias sikgen="homesick generate"
alias sikhlp="homesick help"
alias siklnk="homesick link dotfiles"
alias sikls="homesick list"
alias sikopn="homesick open dotfiles"
alias sikpll="homesick pull dotfiles"
alias sikpsh="homesick push dotfiles"
alias sikrc="homesick rc dotfiles"
alias sikpth="homesick show_path dotfiles"
alias sikst="homesick status dotfiles"
alias sikulnk="homesick unlink dotfiles"
alias sikv="homesick version"
@@ -0,0 +1,49 @@
# shellcheck shell=bash
about-alias 'jitsu task abbreviations'
# jitsu
alias j='jitsu'
alias jl='jitsu login'
alias jo='jitsu logout'
# deploy and update
alias jd='jitsu apps deploy'
alias ju='jitsu apps update'
# new and start, restart, stop
alias jn='jitsu apps create'
alias js='jitsu apps start'
alias jr='jitsu apps restart'
alias jx='jitsu apps stop'
# logs
alias jll='jitsu logs'
alias jlog='jitsu logs'
alias jlogs='jitsu logs'
# env
alias je='jitsu env'
alias jel='jitsu env list'
alias jes='jitsu env set'
alias jeg='jitsu env get'
alias jed='jitsu env delete'
alias jec='jitsu env clear'
alias jesv='jitsu env save'
alias jeld='jitsu env load'
# configuration
alias jc='jitsu conf'
alias jcl='jitsu config list'
alias jcs='jitsu config set'
alias jcg='jitsu config get'
alias jcd='jitsu config delete'
# list and install, view
alias jls='jitsu list'
alias jin='jitsu install'
alias jv='jitsu apps view'
# Database, Snapshots and Tokens
alias jdb='jitsu databases'
alias jss='jitsu snapshots'
alias jto='jitsu tokens'
@@ -0,0 +1,20 @@
# shellcheck shell=bash
about-alias 'kubectl aliases'
function _set_pkg_aliases() {
if _command_exists kubectl; then
alias kc='kubectl'
alias kcgp='kubectl get pods'
alias kcgd='kubectl get deployments'
alias kcgn='kubectl get nodes'
alias kcdp='kubectl describe pod'
alias kcdd='kubectl describe deployment'
alias kcdn='kubectl describe node'
alias kcgpan='kubectl get pods --all-namespaces'
alias kcgdan='kubectl get deployments --all-namespaces'
# launches a disposable netshoot pod in the k8s cluster
alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
fi
}
_set_pkg_aliases
@@ -0,0 +1,74 @@
# shellcheck shell=bash
about-alias 'laravel artisan abbreviations'
# A list of useful laravel aliases
alias laravel='${HOME?}/.composer/vendor/bin/laravel'
# asset
alias a:apub='php artisan asset:publish'
# auth
alias a:remclear='php artisan auth:clear-reminders'
alias a:remcontroller='php artisan auth:reminders-controller'
alias a:remtable='php artisan auth:reminders-table'
# cache
alias a:cacheclear='php artisan cache:clear'
# command
alias a:command='php artisan command:make'
# config
alias a:confpub='php artisan config:publish'
# controller
alias a:controller='php artisan make:controller'
# db
alias a:seed='php artisan db:seed'
# key
alias a:key='php artisan key:generate'
# migrate
alias a:migrate='php artisan migrate'
alias a:mig='a:migrate'
alias a:miginstall='php artisan migrate:install'
alias a:migmake='php artisan migrate:make'
alias a:migcreate='php artisan migrate:create'
alias a:migpublish='php artisan migrate:publish'
alias a:migrefresh='php artisan migrate:refresh'
alias a:migreset='php artisan migrate:reset'
alias a:migrollback='php artisan migrate:rollback'
alias a:rollback='a:migrollback'
# queue
alias a:qfailed='php artisan queue:failed'
alias a:qfailedtable='php artisan queue:failed-table'
alias a:qflush='php artisan queue:flush'
alias a:qforget='php artisan queue:forget'
alias a:qlisten='php artisan queue:listen'
alias a:qretry='php artisan queue:retry'
alias a:qsubscribe='php artisan queue:subscribe'
alias a:qwork='php artisan queue:work'
# session
alias a:stable='php artisan session:table'
# view
alias a:vpub='php artisan view:publish'
# misc
alias a:='php artisan'
alias a:changes='php artisan changes'
alias a:down='php artisan down'
alias a:env='php artisan env'
alias a:help='php artisan help'
alias a:list='php artisan list'
alias a:optimize='php artisan optimize'
alias a:routes='php artisan routes'
alias a:serve='php artisan serve'
alias a:tail='php artisan tail'
alias a:tinker='php artisan tinker'
alias a:up='php artisan up'
alias a:work='php artisan workbench'
@@ -0,0 +1,14 @@
# shellcheck shell=bash
about-alias 'maven abbreviations'
alias mci='mvn clean install'
alias mi='mvn install'
alias mcp='mvn clean package'
alias mp='mvn package'
alias mrprep='mvn release:prepare'
alias mrperf='mvn release:perform'
alias mrrb='mvn release:rollback'
alias mdep='mvn dependency:tree'
alias mpom='mvn help:effective-pom'
alias mcisk='mci -Dmaven.test.skip=true'
alias mcpsk='mcp -Dmaven.test.skip=true'
@@ -0,0 +1,14 @@
# shellcheck shell=bash
about-alias 'MSYS2 aliases'
LS_COMMON="-hG"
LS_COMMON="$LS_COMMON --color=auto"
LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat\*"
# alias
# setup the main ls alias if we've established common args
alias ls='command ls ${LS_COMMON:-}'
alias ll="ls -l"
alias la="ls -a"
alias lal="ll -a"
alias lf="ls -F"
@@ -0,0 +1,8 @@
# shellcheck shell=bash
about-alias 'the Node.js environment aliases'
# alias to setup nodejs development environment
alias node-dev='export NODE_ENV=development'
# alias to setup nodejs production environment
alias node-prod='export NODE_ENV=production'
@@ -0,0 +1,43 @@
# shellcheck shell=bash
about-alias 'common npm abbreviations'
# Aliases
# npm
alias ni='npm install'
alias nis='npm install --save'
alias nid='npm install --save-dev'
alias nit='npm install-test'
alias nits='npm install-test --save'
alias nitd='npm install-test --save-dev'
alias nu='npm uninstall'
alias nus='npm uninstall --save'
alias nusd='npm uninstall --save-dev'
alias np='npm publish'
alias nup='npm unpublish'
alias nlk='npm link'
alias nod='npm outdated'
alias nrb='npm rebuild'
alias nud='npm update'
alias nr='npm run'
alias nls='npm list --depth=0 2>/dev/null'
alias nlsg='npm list -g --depth=0 2>/dev/null'
alias nt='npm test'
# npx
alias nx='npx'
alias nxplease='npx $(fc -ln -1)'
alias nxn='npx --no-install '
alias nxp='npx -p '
alias nxnp='npx --no-install -p '
alias nxq='npx -q '
alias nxnq='npx --no-install -q '
alias nxqp='npx -q -p '
alias nxnqp='npx --no-install -q -p '
alias nxni='npx --no-install --ignore-existing '
alias nxip='npx --ignore-existing -p '
alias nxnip='npx --no-install --ignore-existing -p '
alias nxqi='npx -q --ignore-existing '
alias nxniq='npx --no-install --ignore-existing -q '
alias nxiqp='npx --ignore-existing -q -p '
alias nxniqp='npx --no-install --ignore-existing -q -p '
@@ -0,0 +1,57 @@
# shellcheck shell=bash
about-alias 'osx-specific aliases'
# Desktop Programs
alias fireworks='open -a "/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app"'
alias photoshop='open -a "/Applications/Adobe Photoshop CS3/Adobe Photoshop.app"'
alias preview='open -a "${PREVIEW?}"'
alias xcode='open -a "/Applications/XCode.app"'
alias filemerge='open -a "/Developer/Applications/Utilities/FileMerge.app"'
alias safari='open -a safari'
alias firefox='open -a firefox'
alias chrome='open -a "Google Chrome"'
alias chromium='open -a chromium'
alias brave='open -a "Brave Browser"'
alias dashcode='open -a dashcode'
alias f='open -a Finder '
alias fh='open -a Finder .'
alias textedit='open -a TextEdit'
alias hex='open -a "Hex Fiend"'
alias skype='open -a Skype'
alias mou='open -a Mou'
alias subl='open -a "Sublime Text"'
if [[ -s /usr/bin/firefox ]]; then
unalias firefox
fi
# Requires growlnotify, which can be found in the Growl DMG under "Extras"
alias grnot='growlnotify -s -t Terminal -m "Done"'
# Get rid of those pesky .DS_Store files recursively
alias dsclean='find . -type f -name .DS_Store -delete'
# Track who is listening to your iTunes music
alias whotunes='lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689'
# Flush your dns cache
alias flush='dscacheutil -flushcache'
# Show/hide hidden files (for Mac OS X Mavericks)
alias showhidden='defaults write com.apple.finder AppleShowAllFiles TRUE'
alias hidehidden='defaults write com.apple.finder AppleShowAllFiles FALSE'
# From http://apple.stackexchange.com/questions/110343/copy-last-command-in-terminal
# shellcheck disable=SC2142 # The quoting confuses `shellcheck`...
alias copyLastCmd="fc -ln -1 | awk '{\$1=\$1}1' ORS='' | pbcopy"
# Use Finder's Quick Look on a file (^C or space to close)
alias ql='qlmanage -p 2>/dev/null'
# Mute/Unmute the system volume. Plays nice with all other volume settings.
alias mute='osascript -e "set volume output muted true"'
alias unmute='osascript -e "set volume output muted false"'
# Pin to the tail of long commands for an audible alert after long processes
## curl http://downloads.com/hugefile.zip; lmk
alias lmk='say "Process complete."'
@@ -0,0 +1,49 @@
# shellcheck shell=bash
about-alias 'phoenix abbreviations'
# Phoenix Commands
alias i='iex'
alias ips='iex -S mix phx.server'
alias ism='iex -S mix'
alias m='mix'
alias mab='mix archive.build'
alias mai='mix archive.install'
alias mat='mix app.tree'
alias mc='mix compile'
alias mcv='mix compile --verbose'
alias mcx='mix compile.xref'
alias mdc='mix deps.compile'
alias mdg='mix deps.get'
alias mdgc='mix do deps.get, deps.compile'
alias mdu='mix deps.update'
alias mdt='mix deps.tree'
alias mdua='mix deps.update --all'
alias mdun='mix deps.unlock'
alias mduu='mix deps.unlock --unused'
alias meb='mix escript.build'
alias mec='mix ecto.create'
alias mecm='mix do ecto.create, ecto.migrate'
alias med='mix ecto.drop'
alias mem='mix ecto.migrate'
alias megm='mix ecto.gen.migration'
alias merb='mix ecto.rollback'
alias mers='mix ecto.reset'
alias mho='mix hex.outdated'
alias mlh='mix local.hex'
alias mn='mix new'
alias mns='mix new --sup'
alias mpgc='mix phx.gen.channel'
alias mpgh='mix phx.gen.html'
alias mpgj='mix phx.gen.json'
alias mpgm='mix phx.gen.model'
alias mpgs='mix phx.gen.secret'
alias mpn='mix phx.new'
alias mpr='mix phx.routes'
alias mps='mix phx.server'
alias mr='mix run'
alias mrnh='mix run --no-halt'
alias mrl='mix release'
alias mt='mix test'
alias mts='mix test --stale'
alias mtw='mix test.watch'
alias mx='mix xref'
@@ -0,0 +1,9 @@
# shellcheck shell=bash
about-alias 'puppet aliases'
# Aliases
alias pupval="puppet parser validate *.pp"
alias puplint="puppet-lint *.pp"
alias pupagt="puppet agent -t"
alias pupagtd="puppet agent -t --debug"
alias pupapp="puppet apply"
@@ -0,0 +1,152 @@
# shellcheck shell=bash
about-alias 'pyrocms abbreviations'
###
## PyroCMS 3.4 bash aliases
## @author Denis Efremov <efremov.a.denis@gmail.com>
###
# general
alias a:cl="php artisan clear-compiled" # Remove the compiled class file
alias a:d="php artisan down" # Put the application into maintenance mode
alias a:e="php artisan env" # Display the current framework environment
alias a:h="php artisan help" # Displays help for a command
alias a:i="php artisan install" # Install the Streams Platform.
alias a:ls="php artisan list" # Lists commands
alias a:mg="php artisan migrate" # Run the database migrations
alias a:op="php artisan optimize" # Optimize the framework for better performance (deprecated)
alias a:pr="php artisan preset" # Swap the front-end scaffolding for the application
alias a:s="php artisan serve" # Serve the application on the PHP development server
alias a:u="php artisan up" # Bring the application out of maintenance mode
# addon
alias a:ad:i="php artisan addon:install" # Install an addon.
alias a:ad:p="php artisan addon:publish" # Publish an the configuration and translations for an addon.
alias a:ad:r="php artisan addon:reinstall" # Reinstall an addon.
alias a:ad:u="php artisan addon:uninstall" # Uninstall an addon.
# app
alias a:ap:n="php artisan app:name" # Set the application namespace
alias a:ap:p="php artisan app:publish" # Publish general application override files.
# assets
alias a:as:cl="php artisan assets:clear" # Clear compiled public assets.
# auth
alias a:au:clrs="php artisan auth:clear-resets" # Flush expired password reset tokens
# cache
alias a:ca:cl="php artisan cache:clear" # Flush the application cache
alias a:ca:f="php artisan cache:forget" # Remove an item from the cache
alias a:ca:t="php artisan cache:table" # Create a migration for the cache database table
# config
alias a:co:ca="php artisan config:cache" # Create a cache file for faster configuration loading
alias a:co:cl="php artisan config:clear" # Remove the configuration cache file
# db
alias a:db:s="php artisan db:seed" # Seed the database with records
# env
alias a:en:s="php artisan env:set" # Set an environmental value.
# event
alias a:ev:g="php artisan event:generate" # Generate the missing events and listeners based on registration
# extension
alias a:ex:i="php artisan extension:install" # Install a extension.
alias a:ex:r="php artisan extension:reinstall" # Reinstall a extension.
alias a:ex:u="php artisan extension:uninstall" # Uninstall a extension.
# files
alias a:fi:cl="php artisan files:clean" # Clean missing files from the files table.
# key
alias a:ke:g="php artisan key:generate" # Set the application key
# make
alias a:mk:ad="php artisan make:addon" # Create a new addon.
alias a:mk:au="php artisan make:auth" # Scaffold basic login and registration views and routes
alias a:mk:cm="php artisan make:command" # Create a new Artisan command
alias a:mk:ct="php artisan make:controller" # Create a new controller class
alias a:mk:ev="php artisan make:event" # Create a new event class
alias a:mk:fa="php artisan make:factory" # Create a new model factory
alias a:mk:j="php artisan make:job" # Create a new job class
alias a:mk:li="php artisan make:listener" # Create a new event listener class
alias a:mk:ma="php artisan make:mail" # Create a new email class
alias a:mk:mw="php artisan make:middleware" # Create a new middleware class
alias a:mk:mg="php artisan make:migration" # Create a new migration file
alias a:mk:md="php artisan make:model" # Create a new Eloquent model class
alias a:mk:no="php artisan make:notification" # Create a new notification class
alias a:mk:po="php artisan make:policy" # Create a new policy class
alias a:mk:pr="php artisan make:provider" # Create a new service provider class
alias a:mk:rq="php artisan make:request" # Create a new form request class
alias a:mk:rs="php artisan make:resource" # Create a new resource
alias a:mk:rl="php artisan make:rule" # Create a new validation rule
alias a:mk:sd="php artisan make:seeder" # Create a new seeder class
alias a:mk:st="php artisan make:stream" # Make a streams entity namespace.
alias a:mk:ts="php artisan make:test" # Create a new test class
# migrate
alias a:mg:fr="php artisan migrate:fresh" # Drop all tables and re-run all migrations
alias a:mg:i="php artisan migrate:install" # Create the migration repository
alias a:mg:rf="php artisan migrate:refresh" # Reset and re-run all migrations
alias a:mg:rs="php artisan migrate:reset" # Rollback all database migrations
alias a:mg:rl="php artisan migrate:rollback" # Rollback the last database migration
alias a:mg:st="php artisan migrate:status" # Show the status of each migration
# module
alias a:mo:i="php artisan module:install" # Install a module.
alias a:mo:r="php artisan module:reinstall" # Reinstall a module.
alias a:mo:u="php artisan module:uninstall" # Uninstall a module.
# notifications
alias a:no:tb="php artisan notifications:table" # Create a migration for the notifications table
# package
alias a:pk:d="php artisan package:discover" # Rebuild the cached package manifest
# queue
alias a:qu:fa="php artisan queue:failed" # List all of the failed queue jobs
alias a:qu:ft="php artisan queue:failed-table" # Create a migration for the failed queue jobs database table
alias a:qu:fl="php artisan queue:flush" # Flush all of the failed queue jobs
alias a:qu:fg="php artisan queue:forget" # Delete a failed queue job
alias a:qu:li="php artisan queue:listen" # Listen to a given queue
alias a:qu:rs="php artisan queue:restart" # Restart queue worker daemons after their current job
alias a:qu:rt="php artisan queue:retry" # Retry a failed queue job
alias a:qu:tb="php artisan queue:table" # Create a migration for the queue jobs database table
alias a:qu:w="php artisan queue:work" # Start processing jobs on the queue as a daemon
# route
alias a:ro:ca="php artisan route:cache" # Create a route cache file for faster route registration
alias a:ro:cl="php artisan route:clear" # Remove the route cache file
alias a:ro:ls="php artisan route:list" # List all registered routes
# schedule
alias a:sc:r="php artisan schedule:run" # Run the scheduled commands
# scout
alias a:su:fl="php artisan scout:flush" # Flush all of the model's records from the index
alias a:su:im="php artisan scout:import" # Import the given model into the search index
# session
alias a:se:tb="php artisan session:table" # Create a migration for the session database table
# storage
alias a:sg:l="php artisan storage:link" # Create a symbolic link from "public/storage" to "storage/app/public"
# streams
alias a:st:cl="php artisan streams:cleanup" # Cleanup streams entry models.
alias a:st:co="php artisan streams:compile" # Compile streams entry models.
alias a:st:d="php artisan streams:destroy" # Destroy a namespace.
alias a:st:p="php artisan streams:publish" # Publish configuration and translations for streams.
alias a:st:r="php artisan streams:refresh" # Refresh streams generated components.
# tntsearch
alias a:tn:im="php artisan tntsearch:import" # Import the given model into the search index
# vendor
alias a:ve:p="php artisan vendor:publish" # Publish any publishable assets from vendor packages
# view
alias a:vi:cl="php artisan view:clear" # Clear all compiled view files
@@ -0,0 +1,22 @@
# shellcheck shell=bash
about-alias 'rails abbreviations'
# Rails Commands
alias r='rails'
alias rg='rails g'
alias rs='rails s'
alias rc='rails c'
alias rn='rails new'
alias rb='rails dbconsole'
alias rp='rails plugin'
alias ra='rails application'
alias rd='rails destroy'
alias dbm='rake db:migrate'
alias ss='script/server'
alias ts="thin start" # thin server
alias sc='script/console'
alias restartapp='touch tmp/restart.txt'
alias restart='touch tmp/restart.txt' # restart passenger
alias devlog='tail -f log/development.log'
alias taild='tail -f log/development.log' # tail dev log
@@ -0,0 +1,15 @@
# shellcheck shell=bash
about-alias 'common svn abbreviations'
# Aliases
alias svs='svn status'
alias sa='svn add'
alias sci='svn ci -m'
alias sco='svn co'
alias sup='svn up'
alias scu='svn cleanup'
alias sli='svn list'
alias sdel='svn delete'
alias sdif='svn diff'
alias slog='svn log'
alias smv='svn move'
@@ -0,0 +1,22 @@
# shellcheck shell=bash
about-alias 'systemd service'
case $OSTYPE in
linux*)
# 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'
alias scdru='systemctl --user daemon-reload'
alias scr='systemctl restart'
alias scru='systemctl --user restart'
alias sce='systemctl stop'
alias sceu='systemctl --user stop'
alias scs='systemctl start'
alias scsu='systemctl --user start'
# Keeping previous aliases for a non-breaking change.
alias scue='sceu'
alias scus='scsu'
alias scur='scdru'
;;
esac
@@ -0,0 +1,8 @@
# shellcheck shell=bash
about-alias 'Aliases for Terraform and Terragrunt'
alias tf='terraform'
alias tfv='terraform validate'
alias tfp='terraform plan'
alias tfa='terraform apply'
alias tfd='terraform destroy'
@@ -0,0 +1,13 @@
# shellcheck shell=bash
about-alias 'Aliases for Terraform and Terragrunt'
alias tg='terragrunt'
alias tgv='terragrunt validate'
alias tgp='terragrunt plan'
alias tga='terragrunt apply'
alias tgd='terragrunt destroy'
alias tgva='terragrunt validate-all'
alias tgpa='terragrunt plan-all'
alias tgaa='terragrunt apply-all'
alias tgda='terragrunt destroy-all'
@@ -0,0 +1,10 @@
# shellcheck shell=bash
about-alias 'textmate abbreviations'
case $OSTYPE in
darwin*)
# Textmate
alias e='mate . &'
alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &'
;;
esac
@@ -0,0 +1,6 @@
# shellcheck shell=bash
about-alias 'Tmux terminal multiplexer'
alias txl='tmux ls'
alias txn='tmux new -s'
alias txa='tmux a -t'
@@ -0,0 +1,8 @@
# shellcheck shell=bash
about-alias 'todo.txt-cli abbreviations'
alias tls='"${TODO?}" ls'
alias ta='"${TODO?}" a'
alias trm='"${TODO?}" rm'
alias tdo='"${TODO?}" do'
alias tpri='"${TODO?}" pri'
@@ -0,0 +1,11 @@
# shellcheck shell=bash
about-alias 'uuidgen aliases'
if _command_exists uuid; then # Linux
alias uuidu="uuid | tr '[:lower:]' '[:upper:]'"
alias uuidl=uuid
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
fi
@@ -0,0 +1,22 @@
# shellcheck shell=bash
about-alias 'vagrant aliases'
# Aliases
alias vhl='vagrant hosts list'
alias vscp='vagrant scp'
alias vsl='vagrant snapshot list'
alias vst='vagrant snapshot take'
alias vup="vagrant up"
alias vupl="vagrant up 2>&1 | tee vagrant.log"
alias vh="vagrant halt"
alias vs="vagrant suspend"
alias vr="vagrant resume"
alias vrl="vagrant reload"
alias vssh="vagrant ssh"
alias vst="vagrant status"
alias vp="vagrant provision"
alias vdstr="vagrant destroy"
# requires vagrant-list plugin
alias vl="vagrant list"
# requires vagrant-hostmanager plugin
alias vhst="vagrant hostmanager"
@@ -0,0 +1,15 @@
# shellcheck shell=bash
about-alias 'vault aliases'
# Aliases
alias vad="vault delete"
alias val="vault list"
alias var="vault read"
alias varn="vault renew"
alias varv="vault revoke"
alias vasrv="vault server"
alias vas="vault status"
alias vav="vault version"
alias vaw="vault write"
alias vag="vault login -method=github"
alias varv="vault read -field=value"
@@ -0,0 +1,14 @@
# shellcheck shell=bash
about-alias 'vim abbreviations'
_command_exists vim || return
alias v='vim'
# open the vim help in fullscreen incorporated from
# https://stackoverflow.com/a/4687513
alias vimh='vim -c ":h | only"'
# open vim in new tab is taken from
# http://stackoverflow.com/questions/936501/let-gvim-always-run-a-single-instancek
_command_exists mvim && function mvimt { command mvim --remote-tab-silent "$@" || command mvim "$@"; }
_command_exists gvim && function gvimt { command gvim --remote-tab-silent "$@" || command gvim "$@"; }
@@ -0,0 +1,26 @@
# shellcheck shell=bash
about-alias 'yarn package manager aliases'
# Aliases
alias ya='yarn'
alias yai='yarn init'
alias yaa='yarn add'
alias yaga='yarn global add'
alias yaad='yarn add --dev'
alias yau='yarn upgrade'
alias yarm='yarn remove'
alias yagrm='yarn global remove'
alias yaod='yarn outdated'
alias yapa='yarn pack'
alias yap='yarn publish'
alias yasu='yarn self-update'
alias yaru='yarn run'
alias yat='yarn test'
alias yas='yarn serve'
alias yacc='yarn cache clean'
alias yack='yarn check'
alias yals='yarn list'
alias yain='yarn info'
alias yali='yarn licenses ls'
alias yaloi='yarn login'
alias yaloo='yarn logout'