diff --git a/base/.profile b/base/.profile index 6db2c8c1..acacf730 100755 --- a/base/.profile +++ b/base/.profile @@ -1,15 +1,13 @@ #!/bin/sh - -# Copyright (c) 2017 rehashedsalt/vintagesalt +# +# My shell profile +# +# Copyright (c) 2017-2022 Jacob Babor # Licensed under the terms of the MIT license - -## POSIX NOTICE -# This script, or at least the parts expected to be run by a standard sh -# implementation, should be fully POSIX-compliant. If it is not, open a bug -# report at git.9iron.club/salt/home and I'll take care of it. +# ## SHELLCHECK -# Not finding these sources is none of my concern; they're out of scope +# Yeah whatever I don't care that you can't find these # shellcheck disable=1091 # shellcheck disable=1090 # I'm well aware of when functions are defined vs used @@ -55,11 +53,6 @@ has() { command -v "$1" > /dev/null 2>&1 } -# Doot -if ! has doot; then - alias doot="echo Doot doot." -fi - # Grab pip completion, if it exists if has pip; then case "$_baseshell" in @@ -81,34 +74,6 @@ if has pip; then ;; esac fi -if has kubectl; then - case "$_baseshell" in - *bash) - if ! [ -f "$HOME/.kubectl-completion-bash" ]; then - kubectl completion bash > "$HOME/.kubectl-completion-bash" - echo ".profile: Created kubectl completion for bash" - fi - . "$HOME/.kubectl-completion-bash" - ;; - *) - ;; - esac -fi -if has terraform; then - case "$_baseshell" in - *bash) - complete -C "$(which terraform)" terraform - ;; - *) - ;; - esac -fi - -# Set up go, if we have it -if has go; then - export GOPATH="$HOME/.local/go" - [ "${PATH#*$GOPATH}" = "$PATH" ] && export PATH="$PATH:$GOPATH/bin" -fi # Grab dircolors, if it exists if has dircolors; then @@ -127,35 +92,11 @@ for editor in vim vi nano; do break fi done -alias e='$EDITOR' # Now for a shitton of aliases -if ! has define; then - if has mate-dictionary; then - alias define='mate-dictionary -n --look-up' - fi -fi -if ! has helpme; then - # https://breanneboland.com/blog/2020/02/28/you-can-put-what-in-dns-txt-records-a-blog-post-for-con-west-2020/ - alias helpme='dig +short txt "$(( RANDOM % 50 )).maybethiscould.work"' -fi -if has emerge; then - alias e-depclean='sudo emerge -a --depclean' - alias e-inst='sudo emerge -a --jobs --tree --quiet-build y' - alias e-upgrade='sudo emerge -DNUua --jobs --tree --quiet-build y --with-bdeps=y --keep-going --backtrack=1000 @world' - alias e-newuse='sudo emerge -Uva --jobs --tree --quiet-build y @world' - alias e-search='emerge -s' - alias e-sync='sudo emerge --sync' - if has eclean; then - alias e-cleanup='sudo eclean -d distfiles && sudo eclean -d packages' - fi -fi if has firestarter and ! has fs; then alias fs="firestarter" fi -if has fork; then - alias dup="fork $TERMINAL $PWD" -fi if has git; then # Thanks Bash-it! alias g='git' @@ -243,22 +184,6 @@ if has git; then # Show untracked files alias gu='git ls-files . --exclude-standard --others' fi -if has kubectl; then - alias k='kubectl' -fi -if has nc; then - # I'm not sorry - alias blinkenlights='nc -v towel.blinkenlights.nl 23' -fi -if has ptgdp; then - song() { - if [ -z "$*" ]; then - echo "song: Requires an argument" - return 1 - fi - echo "$*" | ptgdp -p - } -fi if has sed && has find; then replace() { if [ $# -ne 2 ]; then @@ -286,11 +211,6 @@ if has tree; then alias ts="tree $treeargs -hL 2" unset treeargs fi -if has vault; then - alias vlogin="vault login -method=ldap username=$(whoami)" - alias vls="vault list" - alias vr="vault read" -fi # Aliases for common utilities if [ "$(uname)" = "Linux" ] || has brew; then @@ -395,7 +315,6 @@ case "$_baseshell" in esac # Clean up -unset gnubin unset -v _baseshell unset -f has