# originally, the functions were all aliases. # # then, delusions of creating terminal-based object-orientedness struck. # # # generally, this entire stack of functionality has gone through refinement of: # oneliner-->alias # alias-->function # function-->class # # where "class" can mean sourcefile (.src) or scriptfile (.sh) # # # # # some of this is just QoL stuff that hasn't become it's own thing # # # # # make nano more usable, including for alias bypass edge cases nanoString='nano --nowrap --backup --positionlog --autoindent --linenumbers --softwrap --tabsize 3' alias nano="${nanoString}" export EDITOR="${nanoString}" export GIT_EDITOR="${EDITOR}" if [[ "${DEBUG}" -gt 1 ]]; then lt "setup editor" fi # easy ssh key stuffs alias ssh-makey='ssh-keygen -a 256 -t ed25519' alias ssh-mykey='cat ~/.ssh/id_ed25519.pub' alias ssh-showkey='cat ~/.ssh/id_ed25519.pub && echo -e "^-- personal pubkey\n\nserver key(s) --v"; ssh-keygen -lf <(ssh-keyscan localhost 2>/dev/null)' if [[ "${DEBUG}" -gt 1 ]]; then lt "loaded ssh QoL mixins" fi alias sd='shutdown -hP now' #alias when='date +"%j day %t%t%t (y:%Y - m:%m w:%V d:%d)%n%H:%M.%S chrono%t%t%t%t (%Z/UTC%z)"' alias when='date +%Y.%j.%H%M%S (%Z / UTC%z)' alias brewgrade="brew upgrade && brew update" export HISTSIZE=10000000 if [[ "${DEBUG}" -gt 1 ]]; then lt "set history size to 10MM" fi shopt -s histappend if [[ "${DEBUG}" -gt 1 ]]; then lt "setup histtory append" fi export HISTTIMEFORMAT='%FT%T%z ' if [[ "${DEBUG}" -gt 1 ]]; then lt "set history time format" fi