From 7c2c2a5525557cbfee98e73de921fd7f7e6811a1 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 12:44:18 -0800 Subject: [PATCH 01/10] aliases: run `shfmt` on the whole folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My apologies to future `git blame` hunters ♥ --- aliases/available/apt.aliases.bash | 6 +- aliases/available/curl.aliases.bash | 24 ++-- aliases/available/docker.aliases.bash | 42 +++--- aliases/available/emacs.aliases.bash | 22 +-- aliases/available/fuck.aliases.bash | 4 +- aliases/available/general.aliases.bash | 41 +++--- aliases/available/kubectl.aliases.bash | 29 ++-- aliases/available/osx.aliases.bash | 4 +- aliases/available/pyrocms.aliases.bash | 178 ++++++++++++------------ aliases/available/rails.aliases.bash | 4 +- aliases/available/systemd.aliases.bash | 34 ++--- aliases/available/textmate.aliases.bash | 10 +- aliases/available/uuidgen.aliases.bash | 10 +- clean_files.txt | 7 +- 14 files changed, 200 insertions(+), 215 deletions(-) diff --git a/aliases/available/apt.aliases.bash b/aliases/available/apt.aliases.bash index b7ef274c81..1d43ffac66 100644 --- a/aliases/available/apt.aliases.bash +++ b/aliases/available/apt.aliases.bash @@ -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' diff --git a/aliases/available/curl.aliases.bash b/aliases/available/curl.aliases.bash index a6b2b344ed..a1a6d221cd 100644 --- a/aliases/available/curl.aliases.bash +++ b/aliases/available/curl.aliases.bash @@ -4,20 +4,18 @@ 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 - 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' + 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 diff --git a/aliases/available/docker.aliases.bash b/aliases/available/docker.aliases.bash index 9f005aa7ba..c1b344ce14 100644 --- a/aliases/available/docker.aliases.bash +++ b/aliases/available/docker.aliases.bash @@ -2,31 +2,31 @@ cite 'about-alias' 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 +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 - ;; + 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 [ ! -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 - 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 +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 + 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)' diff --git a/aliases/available/emacs.aliases.bash b/aliases/available/emacs.aliases.bash index f8e1259b80..78554e0ab4 100644 --- a/aliases/available/emacs.aliases.bash +++ b/aliases/available/emacs.aliases.bash @@ -2,15 +2,15 @@ cite 'about-alias' 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' - ;; + 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 diff --git a/aliases/available/fuck.aliases.bash b/aliases/available/fuck.aliases.bash index 495ea851a3..6a67a2e908 100644 --- a/aliases/available/fuck.aliases.bash +++ b/aliases/available/fuck.aliases.bash @@ -2,8 +2,8 @@ cite 'about-alias' 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)' +if ! _command_exists fuck; then + alias fuck='sudo $(fc -ln -1)' fi alias please=fuck alias plz=please diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index 3c29928d10..f03ccb1c11 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -1,17 +1,15 @@ cite about-alias about-alias 'general aliases' -if ls --color -d . &> /dev/null -then - alias ls="ls --color=auto" -elif ls -G -d . &> /dev/null -then - alias ls='ls -G' # Compact view, show colors +if ls --color -d . &> /dev/null; then + alias ls="ls --color=auto" +elif ls -G -d . &> /dev/null; then + alias ls='ls -G' # Compact view, show colors fi # List directory contents alias sl=ls -alias la='ls -AF' # Compact view, show hidden +alias la='ls -AF' # Compact view, show hidden alias ll='ls -al' alias l='ls -a' alias l1='ls -1' @@ -26,14 +24,12 @@ 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 - alias grep='grep --color=auto' +if grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null; then + alias grep='grep --color=auto' fi -if _command_exists gshuf -then - alias shuf=gshuf +if _command_exists gshuf; then + alias shuf=gshuf fi alias c='clear' @@ -66,9 +62,8 @@ alias -- -='cd -' # Go back alias h='history' # Tree -if ! _command_exists tree -then - alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" +if ! _command_exists tree; then + alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" fi # Directory @@ -84,13 +79,13 @@ alias snano="sudo nano" # Display whatever file is regular file or folder catt() { - for i in "$@"; do - if [ -d "$i" ]; then - ls "$i" - else - cat "$i" - fi - done + 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 diff --git a/aliases/available/kubectl.aliases.bash b/aliases/available/kubectl.aliases.bash index 440a9041f0..5343ef7f5d 100644 --- a/aliases/available/kubectl.aliases.bash +++ b/aliases/available/kubectl.aliases.bash @@ -5,21 +5,20 @@ cite 'about-alias' 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 +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 diff --git a/aliases/available/osx.aliases.bash b/aliases/available/osx.aliases.bash index 5e30bc7c20..0217fe81c9 100644 --- a/aliases/available/osx.aliases.bash +++ b/aliases/available/osx.aliases.bash @@ -20,8 +20,8 @@ alias skype='open -a Skype' alias mou='open -a Mou' alias subl='open -a Sublime\ Text' -if [ -s /usr/bin/firefox ] ; then - unalias firefox +if [ -s /usr/bin/firefox ]; then + unalias firefox fi # Requires growlnotify, which can be found in the Growl DMG under "Extras" diff --git a/aliases/available/pyrocms.aliases.bash b/aliases/available/pyrocms.aliases.bash index d19dff9149..8ab76b61cf 100644 --- a/aliases/available/pyrocms.aliases.bash +++ b/aliases/available/pyrocms.aliases.bash @@ -7,146 +7,146 @@ about-alias 'pyrocms abbreviations' ### # 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 +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. +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. +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. +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 +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 +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 +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 +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. +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 +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. +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. +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 +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 +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 +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. +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 +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 +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 +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 +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 +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 +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 +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" +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. +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 +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 +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 +alias a:vi:cl="php artisan view:clear" # Clear all compiled view files diff --git a/aliases/available/rails.aliases.bash b/aliases/available/rails.aliases.bash index c776660eeb..b63f9a4b1a 100644 --- a/aliases/available/rails.aliases.bash +++ b/aliases/available/rails.aliases.bash @@ -14,9 +14,9 @@ alias rd='rails destroy' alias dbm='rake db:migrate' alias ss='script/server' -alias ts="thin start" # thin 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 restart='touch tmp/restart.txt' # restart passenger alias devlog='tail -f log/development.log' alias taild='tail -f log/development.log' # tail dev log diff --git a/aliases/available/systemd.aliases.bash b/aliases/available/systemd.aliases.bash index 19b0eae624..8a82ff96e1 100644 --- a/aliases/available/systemd.aliases.bash +++ b/aliases/available/systemd.aliases.bash @@ -2,21 +2,21 @@ cite 'about-alias' 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' - ;; + 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 diff --git a/aliases/available/textmate.aliases.bash b/aliases/available/textmate.aliases.bash index f0f69e4389..ca88eebf33 100644 --- a/aliases/available/textmate.aliases.bash +++ b/aliases/available/textmate.aliases.bash @@ -2,9 +2,9 @@ cite 'about-alias' 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 &' - ;; + darwin*) + # Textmate + alias e='mate . &' + alias et='mate app config db lib public script test spec config.ru Gemfile Rakefile README &' + ;; esac diff --git a/aliases/available/uuidgen.aliases.bash b/aliases/available/uuidgen.aliases.bash index aada05fba0..08478dbdfa 100644 --- a/aliases/available/uuidgen.aliases.bash +++ b/aliases/available/uuidgen.aliases.bash @@ -2,10 +2,10 @@ cite 'uuid-alias' about-alias 'uuidgen aliases' if _command_exists uuid; then # Linux - alias uuidu="uuid | tr '[:lower:]' '[:upper:]'" - alias uuidl=uuid + 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 + alias uuidu="uuidgen" + alias uuid="uuidgen | tr '[:upper:]' '[:lower:]'" # because upper case is like YELLING + alias uuidl=uuid fi diff --git a/clean_files.txt b/clean_files.txt index 6ef4d247ff..54180c19fd 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -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 From 5748aa20a7bda68a4627caa08480f19a2c1fde1e Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 12:49:48 -0800 Subject: [PATCH 02/10] alias/docker: `shellcheck` --- aliases/available/docker.aliases.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aliases/available/docker.aliases.bash b/aliases/available/docker.aliases.bash index c1b344ce14..1c49207f49 100644 --- a/aliases/available/docker.aliases.bash +++ b/aliases/available/docker.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'docker abbreviations' alias dk='docker' @@ -19,7 +19,7 @@ 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 +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 From 11aa32387ed4045b22f9f0e552904668a44d8013 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 12:56:16 -0800 Subject: [PATCH 03/10] alias/general: `shellcheck` --- aliases/available/general.aliases.bash | 27 +++++++++++++------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index f03ccb1c11..fddd6a734d 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -1,10 +1,9 @@ -cite about-alias +# shellcheck shell=bash about-alias 'general aliases' -if ls --color -d . &> /dev/null; then +if command ls --color -d . &> /dev/null; then alias ls="ls --color=auto" -elif ls -G -d . &> /dev/null; then - alias ls='ls -G' # Compact view, show colors + # BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set. fi # List directory contents @@ -18,13 +17,13 @@ alias lf='ls -F' alias _="sudo" # Shortcuts to edit startup files -alias vbrc="vim ~/.bashrc" -alias vbpf="vim ~/.bash_profile" +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 grep --color=auto "a" "${BASH_IT}/"*.md &> /dev/null; then +if command grep --color=auto "a" "${BASH_IT?}"/*.md &> /dev/null; then alias grep='grep --color=auto' fi @@ -36,12 +35,12 @@ alias c='clear' alias k='clear' alias cls='clear' -alias edit="$EDITOR" -alias pager="$PAGER" +alias edit='${EDITOR:-${ALTERNATE_EDITOR?}}' +alias pager='${PAGER:=less}' alias q='exit' -alias irc="${IRC_CLIENT:=irc}" +alias irc='${IRC_CLIENT:=irc}' # Language aliases alias rb='ruby' @@ -74,13 +73,13 @@ alias rd='rmdir' alias xt="extract" # sudo editors -alias svim="sudo vim" +alias svim="sudo ${VISUAL:-vim}" alias snano="sudo nano" # Display whatever file is regular file or folder -catt() { +function catt() { for i in "$@"; do - if [ -d "$i" ]; then + if [[ -d "$i" ]]; then ls "$i" else cat "$i" @@ -94,5 +93,5 @@ catt() { # aliases and enable just the ones for Bash-it explicitly: # bash-it disable alias general # bash-it enable alias bash-it -# shellcheck source=./bash-it.aliases.bash +# shellcheck source-path=SCRIPTDIR source "$BASH_IT/aliases/available/bash-it.aliases.bash" From 826916be4ffdcb84bb73ca9f3067ea5e51ad24a5 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 12:58:47 -0800 Subject: [PATCH 04/10] alias/homesick: `shellcheck` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Alsö, remove impossible alias. If someone wants it, they can write the function, but since aliases literally don't work this way it seems obvious that nobody has ever used it. --- aliases/available/homesick.aliases.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aliases/available/homesick.aliases.bash b/aliases/available/homesick.aliases.bash index 548efc3b38..00101eedb2 100644 --- a/aliases/available/homesick.aliases.bash +++ b/aliases/available/homesick.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'homesick aliases' # Aliases @@ -19,6 +19,5 @@ alias sikpsh="homesick push dotfiles" alias sikrc="homesick rc dotfiles" alias sikpth="homesick show_path dotfiles" alias sikst="homesick status dotfiles" -alias siktrk="homesick track $1 dotfiles" alias sikulnk="homesick unlink dotfiles" alias sikv="homesick version" From ea6cb6afec7ea07118dc1f2616ed3f2824abeb68 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 13:00:10 -0800 Subject: [PATCH 05/10] alias/laravel: `shellcheck` --- aliases/available/laravel.aliases.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aliases/available/laravel.aliases.bash b/aliases/available/laravel.aliases.bash index 75a51a01b8..50a9749f91 100644 --- a/aliases/available/laravel.aliases.bash +++ b/aliases/available/laravel.aliases.bash @@ -1,9 +1,9 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'laravel artisan abbreviations' # A list of useful laravel aliases -alias laravel="${HOME}/.composer/vendor/bin/laravel" +alias laravel='${HOME?}/.composer/vendor/bin/laravel' # asset alias a:apub='php artisan asset:publish' From 8d30275b8a53745dbcb26a797e81cbd84ab06705 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 13:01:44 -0800 Subject: [PATCH 06/10] alias/msys2: `shellcheck` --- aliases/available/msys2.aliases.bash | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aliases/available/msys2.aliases.bash b/aliases/available/msys2.aliases.bash index 000ea4bc91..da41cc82a3 100644 --- a/aliases/available/msys2.aliases.bash +++ b/aliases/available/msys2.aliases.bash @@ -1,6 +1,4 @@ -#!/bin/bash - -cite 'about-alias' +# shellcheck shell=bash about-alias 'MSYS2 aliases' LS_COMMON="-hG" @@ -9,7 +7,7 @@ LS_COMMON="$LS_COMMON -I NTUSER.DAT\* -I ntuser.dat\*" # alias # setup the main ls alias if we've established common args -test -n "$LS_COMMON" && alias ls="command ls $LS_COMMON" +alias ls='command ls ${LS_COMMON:-}' alias ll="ls -l" alias la="ls -a" alias lal="ll -a" From 665d9e96a85320b7bf7ebdf756445e86277085b3 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 13:05:49 -0800 Subject: [PATCH 07/10] alias/osx: `shellcheck` --- aliases/available/osx.aliases.bash | 39 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/aliases/available/osx.aliases.bash b/aliases/available/osx.aliases.bash index 0217fe81c9..e99bcae6b3 100644 --- a/aliases/available/osx.aliases.bash +++ b/aliases/available/osx.aliases.bash @@ -1,26 +1,26 @@ -cite 'about-alias' +# 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 dashcode="open -a dashcode" +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 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' +alias subl='open -a "Sublime Text"' -if [ -s /usr/bin/firefox ]; then +if [[ -s /usr/bin/firefox ]]; then unalias firefox fi @@ -37,19 +37,20 @@ alias whotunes='lsof -r 2 -n -P -F n -c iTunes -a -i TCP@`hostname`:3689' 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" +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 -alias copyLastCmd='fc -ln -1 | awk '\''{$1=$1}1'\'' ORS='\'''\'' | pbcopy' +# 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'" +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.'" +alias lmk='say "Process complete."' From 604e5c5040451b099665d30e3055874a36904dfb Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 13:06:39 -0800 Subject: [PATCH 08/10] alias/todo.txt-cli: `shellcheck` --- aliases/available/todo.txt-cli.aliases.bash | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/aliases/available/todo.txt-cli.aliases.bash b/aliases/available/todo.txt-cli.aliases.bash index 5bf35d0d77..359321a4b0 100644 --- a/aliases/available/todo.txt-cli.aliases.bash +++ b/aliases/available/todo.txt-cli.aliases.bash @@ -1,8 +1,8 @@ -cite 'about-alias' +# 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" +alias tls='"${TODO?}" ls' +alias ta='"${TODO?}" a' +alias trm='"${TODO?}" rm' +alias tdo='"${TODO?}" do' +alias tpri='"${TODO?}" pri' From 27bfc966ac7a84e5a50d131e0a9c80c35a2e8bca Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 16 Jan 2022 13:15:16 -0800 Subject: [PATCH 09/10] aliases: add shellcheck headers --- aliases/available/ag.aliases.bash | 2 +- aliases/available/ansible.aliases.bash | 2 +- aliases/available/atom.aliases.bash | 2 +- aliases/available/bash-it.aliases.bash | 2 +- aliases/available/bolt.aliases.bash | 2 +- aliases/available/bundler.aliases.bash | 2 +- aliases/available/clipboard.aliases.bash | 1 - aliases/available/composer.aliases.bash | 2 +- aliases/available/curl.aliases.bash | 4 +--- aliases/available/dnf.aliases.bash | 1 - aliases/available/docker-compose.aliases.bash | 2 +- aliases/available/emacs.aliases.bash | 2 +- aliases/available/fuck.aliases.bash | 2 +- aliases/available/git.aliases.bash | 1 - aliases/available/gitsvn.aliases.bash | 2 +- aliases/available/heroku.aliases.bash | 2 +- aliases/available/hg.aliases.bash | 2 +- aliases/available/homebrew-cask.aliases.bash | 6 ++---- aliases/available/homebrew.aliases.bash | 6 ++---- aliases/available/jitsu.aliases.bash | 2 +- aliases/available/kubectl.aliases.bash | 6 +----- aliases/available/maven.aliases.bash | 2 +- aliases/available/node.aliases.bash | 2 +- aliases/available/npm.aliases.bash | 2 +- aliases/available/phoenix.aliases.bash | 2 +- aliases/available/puppet.aliases.bash | 2 +- aliases/available/pyrocms.aliases.bash | 2 +- aliases/available/rails.aliases.bash | 2 +- aliases/available/svn.aliases.bash | 2 +- aliases/available/systemd.aliases.bash | 2 +- aliases/available/terraform.aliases.bash | 6 ++---- aliases/available/terragrunt.aliases.bash | 6 ++---- aliases/available/textmate.aliases.bash | 2 +- aliases/available/tmux.aliases.bash | 2 +- aliases/available/uuidgen.aliases.bash | 2 +- aliases/available/vagrant.aliases.bash | 2 +- aliases/available/vault.aliases.bash | 2 +- aliases/available/vim.aliases.bash | 1 - aliases/available/yarn.aliases.bash | 2 +- 39 files changed, 39 insertions(+), 57 deletions(-) diff --git a/aliases/available/ag.aliases.bash b/aliases/available/ag.aliases.bash index e3157f9433..7f9af7dad5 100644 --- a/aliases/available/ag.aliases.bash +++ b/aliases/available/ag.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'the silver searcher (ag) aliases' ## Summary for args to less: diff --git a/aliases/available/ansible.aliases.bash b/aliases/available/ansible.aliases.bash index 1c53a88e3f..04c5d2801a 100644 --- a/aliases/available/ansible.aliases.bash +++ b/aliases/available/ansible.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'ansible abbreviations' alias ans=ansible diff --git a/aliases/available/atom.aliases.bash b/aliases/available/atom.aliases.bash index 8d70cffaa5..6868e2cc2e 100644 --- a/aliases/available/atom.aliases.bash +++ b/aliases/available/atom.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'Atom.io editor abbreviations' alias a='atom' diff --git a/aliases/available/bash-it.aliases.bash b/aliases/available/bash-it.aliases.bash index d2975667a0..1f16638b0a 100644 --- a/aliases/available/bash-it.aliases.bash +++ b/aliases/available/bash-it.aliases.bash @@ -1,4 +1,4 @@ -cite about-alias +# 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 diff --git a/aliases/available/bolt.aliases.bash b/aliases/available/bolt.aliases.bash index 8490f71031..556dd7fe00 100644 --- a/aliases/available/bolt.aliases.bash +++ b/aliases/available/bolt.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'puppet bolt aliases' # Aliases diff --git a/aliases/available/bundler.aliases.bash b/aliases/available/bundler.aliases.bash index fc20f4ff9d..1eb0086245 100644 --- a/aliases/available/bundler.aliases.bash +++ b/aliases/available/bundler.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'ruby bundler' # Bundler Commands diff --git a/aliases/available/clipboard.aliases.bash b/aliases/available/clipboard.aliases.bash index 4c7e6f5bdf..2a5c3e8c98 100644 --- a/aliases/available/clipboard.aliases.bash +++ b/aliases/available/clipboard.aliases.bash @@ -1,5 +1,4 @@ # shellcheck shell=bash -cite 'about-alias' about-alias 'xclip shortcuts' alias pbcopy="xclip -selection clipboard" diff --git a/aliases/available/composer.aliases.bash b/aliases/available/composer.aliases.bash index 5ccb2e2463..85401abb82 100644 --- a/aliases/available/composer.aliases.bash +++ b/aliases/available/composer.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'common composer abbreviations' # Aliases diff --git a/aliases/available/curl.aliases.bash b/aliases/available/curl.aliases.bash index a1a6d221cd..a270e416d2 100644 --- a/aliases/available/curl.aliases.bash +++ b/aliases/available/curl.aliases.bash @@ -1,6 +1,4 @@ -#!/bin/bash - -cite 'about-alias' +# shellcheck shell=bash about-alias 'Curl aliases for convenience.' # set apt aliases diff --git a/aliases/available/dnf.aliases.bash b/aliases/available/dnf.aliases.bash index 9d9f02673a..25007c23c7 100644 --- a/aliases/available/dnf.aliases.bash +++ b/aliases/available/dnf.aliases.bash @@ -1,5 +1,4 @@ # shellcheck shell=bash -cite 'about-alias' about-alias 'dnf aliases for fedora 22+ distros' alias dnfl="dnf list" # List packages diff --git a/aliases/available/docker-compose.aliases.bash b/aliases/available/docker-compose.aliases.bash index 3583be8fef..a2f637c006 100644 --- a/aliases/available/docker-compose.aliases.bash +++ b/aliases/available/docker-compose.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'docker-compose abbreviations' alias dco="docker-compose" diff --git a/aliases/available/emacs.aliases.bash b/aliases/available/emacs.aliases.bash index 78554e0ab4..a4e4111ada 100644 --- a/aliases/available/emacs.aliases.bash +++ b/aliases/available/emacs.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'emacs editor' case $OSTYPE in diff --git a/aliases/available/fuck.aliases.bash b/aliases/available/fuck.aliases.bash index 6a67a2e908..4cfa52d81b 100644 --- a/aliases/available/fuck.aliases.bash +++ b/aliases/available/fuck.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'fuck/please to retry last command with sudo' # Play nicely with 'thefuck' plugin diff --git a/aliases/available/git.aliases.bash b/aliases/available/git.aliases.bash index a63faa47ef..507037e1d0 100644 --- a/aliases/available/git.aliases.bash +++ b/aliases/available/git.aliases.bash @@ -1,5 +1,4 @@ # shellcheck shell=bash -cite 'about-alias' about-alias 'common git abbreviations' alias g='git' diff --git a/aliases/available/gitsvn.aliases.bash b/aliases/available/gitsvn.aliases.bash index feb608beef..3c578445a7 100644 --- a/aliases/available/gitsvn.aliases.bash +++ b/aliases/available/gitsvn.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'common git-svn abbreviations' # Aliases diff --git a/aliases/available/heroku.aliases.bash b/aliases/available/heroku.aliases.bash index a749d4247d..4c82259438 100644 --- a/aliases/available/heroku.aliases.bash +++ b/aliases/available/heroku.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'heroku task abbreviations' # heroku diff --git a/aliases/available/hg.aliases.bash b/aliases/available/hg.aliases.bash index eea819ff8a..d9101a03c4 100644 --- a/aliases/available/hg.aliases.bash +++ b/aliases/available/hg.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'mercurial abbreviations' alias hs='hg status' diff --git a/aliases/available/homebrew-cask.aliases.bash b/aliases/available/homebrew-cask.aliases.bash index 57d8161c9e..43d206d4a9 100644 --- a/aliases/available/homebrew-cask.aliases.bash +++ b/aliases/available/homebrew-cask.aliases.bash @@ -1,7 +1,5 @@ -# Some aliases for Homebrew Cask - -cite 'about-alias' -about-alias 'homebrew-cask abbreviations' +# shellcheck shell=bash +about-alias 'Some aliases for Homebrew Cask' alias bcin='brew cask install' alias bcrm='brew cask uninstall' diff --git a/aliases/available/homebrew.aliases.bash b/aliases/available/homebrew.aliases.bash index 15907518c3..f35a38d382 100644 --- a/aliases/available/homebrew.aliases.bash +++ b/aliases/available/homebrew.aliases.bash @@ -1,7 +1,5 @@ -# Some aliases for Homebrew - -cite 'about-alias' -about-alias 'homebrew abbreviations' +# shellcheck shell=bash +about-alias 'Some aliases for Homebrew' alias bup='brew update && brew upgrade' alias bout='brew outdated' diff --git a/aliases/available/jitsu.aliases.bash b/aliases/available/jitsu.aliases.bash index 91e96849d0..f056e74989 100644 --- a/aliases/available/jitsu.aliases.bash +++ b/aliases/available/jitsu.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'jitsu task abbreviations' # jitsu diff --git a/aliases/available/kubectl.aliases.bash b/aliases/available/kubectl.aliases.bash index 5343ef7f5d..aaca4ca259 100644 --- a/aliases/available/kubectl.aliases.bash +++ b/aliases/available/kubectl.aliases.bash @@ -1,8 +1,4 @@ -#!/bin/bash -# -# -binaryanomaly - -cite 'about-alias' +# shellcheck shell=bash about-alias 'kubectl aliases' function _set_pkg_aliases() { diff --git a/aliases/available/maven.aliases.bash b/aliases/available/maven.aliases.bash index f8a44a1c9a..737826eb47 100644 --- a/aliases/available/maven.aliases.bash +++ b/aliases/available/maven.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'maven abbreviations' alias mci='mvn clean install' diff --git a/aliases/available/node.aliases.bash b/aliases/available/node.aliases.bash index a1408f263d..a9e29743b4 100644 --- a/aliases/available/node.aliases.bash +++ b/aliases/available/node.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'the Node.js environment aliases' # alias to setup nodejs development environment diff --git a/aliases/available/npm.aliases.bash b/aliases/available/npm.aliases.bash index bd742d5d15..27cf5c9f6a 100644 --- a/aliases/available/npm.aliases.bash +++ b/aliases/available/npm.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'common npm abbreviations' # Aliases diff --git a/aliases/available/phoenix.aliases.bash b/aliases/available/phoenix.aliases.bash index 64728a2ee9..08cef4f406 100644 --- a/aliases/available/phoenix.aliases.bash +++ b/aliases/available/phoenix.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'phoenix abbreviations' # Phoenix Commands diff --git a/aliases/available/puppet.aliases.bash b/aliases/available/puppet.aliases.bash index 15b6992354..c92d13b1f7 100644 --- a/aliases/available/puppet.aliases.bash +++ b/aliases/available/puppet.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'puppet aliases' # Aliases diff --git a/aliases/available/pyrocms.aliases.bash b/aliases/available/pyrocms.aliases.bash index 8ab76b61cf..77865a23a3 100644 --- a/aliases/available/pyrocms.aliases.bash +++ b/aliases/available/pyrocms.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'pyrocms abbreviations' ### diff --git a/aliases/available/rails.aliases.bash b/aliases/available/rails.aliases.bash index b63f9a4b1a..4de4faff30 100644 --- a/aliases/available/rails.aliases.bash +++ b/aliases/available/rails.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'rails abbreviations' # Rails Commands diff --git a/aliases/available/svn.aliases.bash b/aliases/available/svn.aliases.bash index 3d6d263e09..4d3de464c3 100644 --- a/aliases/available/svn.aliases.bash +++ b/aliases/available/svn.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'common svn abbreviations' # Aliases diff --git a/aliases/available/systemd.aliases.bash b/aliases/available/systemd.aliases.bash index 8a82ff96e1..57351ae0b4 100644 --- a/aliases/available/systemd.aliases.bash +++ b/aliases/available/systemd.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'systemd service' case $OSTYPE in diff --git a/aliases/available/terraform.aliases.bash b/aliases/available/terraform.aliases.bash index 09380868d3..baa9b0c7ce 100644 --- a/aliases/available/terraform.aliases.bash +++ b/aliases/available/terraform.aliases.bash @@ -1,7 +1,5 @@ -# Aliases for Terraform and Terragrunt - -cite 'about-alias' -about-alias 'Terraform abbreviations' +# shellcheck shell=bash +about-alias 'Aliases for Terraform and Terragrunt' alias tf='terraform' alias tfv='terraform validate' diff --git a/aliases/available/terragrunt.aliases.bash b/aliases/available/terragrunt.aliases.bash index 9395b35134..94892901f3 100644 --- a/aliases/available/terragrunt.aliases.bash +++ b/aliases/available/terragrunt.aliases.bash @@ -1,7 +1,5 @@ -# Aliases for Terraform and Terragrunt - -cite 'about-alias' -about-alias 'Terragrunt abbreviations' +# shellcheck shell=bash +about-alias 'Aliases for Terraform and Terragrunt' alias tg='terragrunt' alias tgv='terragrunt validate' diff --git a/aliases/available/textmate.aliases.bash b/aliases/available/textmate.aliases.bash index ca88eebf33..e53eed1a1a 100644 --- a/aliases/available/textmate.aliases.bash +++ b/aliases/available/textmate.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'textmate abbreviations' case $OSTYPE in diff --git a/aliases/available/tmux.aliases.bash b/aliases/available/tmux.aliases.bash index 1b07f14952..192db5b589 100644 --- a/aliases/available/tmux.aliases.bash +++ b/aliases/available/tmux.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'Tmux terminal multiplexer' alias txl='tmux ls' diff --git a/aliases/available/uuidgen.aliases.bash b/aliases/available/uuidgen.aliases.bash index 08478dbdfa..45c368204f 100644 --- a/aliases/available/uuidgen.aliases.bash +++ b/aliases/available/uuidgen.aliases.bash @@ -1,4 +1,4 @@ -cite 'uuid-alias' +# shellcheck shell=bash about-alias 'uuidgen aliases' if _command_exists uuid; then # Linux diff --git a/aliases/available/vagrant.aliases.bash b/aliases/available/vagrant.aliases.bash index d479fb2b13..a949cbb3d2 100644 --- a/aliases/available/vagrant.aliases.bash +++ b/aliases/available/vagrant.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'vagrant aliases' # Aliases diff --git a/aliases/available/vault.aliases.bash b/aliases/available/vault.aliases.bash index d2ad8e74b7..4d083fb609 100644 --- a/aliases/available/vault.aliases.bash +++ b/aliases/available/vault.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'vault aliases' # Aliases diff --git a/aliases/available/vim.aliases.bash b/aliases/available/vim.aliases.bash index b426d27004..f80687640b 100644 --- a/aliases/available/vim.aliases.bash +++ b/aliases/available/vim.aliases.bash @@ -1,5 +1,4 @@ # shellcheck shell=bash -cite 'about-alias' about-alias 'vim abbreviations' _command_exists vim || return diff --git a/aliases/available/yarn.aliases.bash b/aliases/available/yarn.aliases.bash index b50535b9f6..a2fb6d0dc5 100644 --- a/aliases/available/yarn.aliases.bash +++ b/aliases/available/yarn.aliases.bash @@ -1,4 +1,4 @@ -cite 'about-alias' +# shellcheck shell=bash about-alias 'yarn package manager aliases' # Aliases From 12a734cb49183ee26fa246b8c502aee62d660f4a Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 13 Feb 2022 14:29:51 -0800 Subject: [PATCH 10/10] aliases/general: use single quotes as much as possible --- aliases/available/general.aliases.bash | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aliases/available/general.aliases.bash b/aliases/available/general.aliases.bash index fddd6a734d..08affb7927 100644 --- a/aliases/available/general.aliases.bash +++ b/aliases/available/general.aliases.bash @@ -2,7 +2,7 @@ about-alias 'general aliases' if command ls --color -d . &> /dev/null; then - alias ls="ls --color=auto" + alias ls='ls --color=auto' # BSD `ls` doesn't need an argument (`-G`) when `$CLICOLOR` is set. fi @@ -14,11 +14,11 @@ alias l='ls -a' alias l1='ls -1' alias lf='ls -F' -alias _="sudo" +alias _='sudo' # Shortcuts to edit startup files -alias vbrc="${VISUAL:-vim} ~/.bashrc" -alias vbpf="${VISUAL:-vim} ~/.bash_profile" +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 @@ -70,11 +70,11 @@ alias md='mkdir -p' alias rd='rmdir' # Shorten extract -alias xt="extract" +alias xt='extract' # sudo editors -alias svim="sudo ${VISUAL:-vim}" -alias snano="sudo nano" +alias svim='sudo ${VISUAL:-vim}' +alias snano='sudo nano' # Display whatever file is regular file or folder function catt() {