HAJWTMACMFFXFLSIVEX5L7IDFEMQXUG33U4KJCPGIH4XLLNUT62QC # created 2024095(+/-3)# author: @jakimfett# inspiration: functions.sh# @todo pull in nano settings from functions.sh. ~/run/mixins.srcDEBUG=1function logThis {if [ "${DEBUG}" -eq 1 ]; thenecho -e "${@}"fi}function lt {logThis "${@}"}lt "@function:logThis/lt selftest" &&\lt "@function:logThis/lt success" && lt "---"function mkrepo {if [ ! -z "${@}" ]; then# case statement?lt "got from user:\n\t'${@}'"if [ "${@:0:1}" == "-" ]; thenlt "got past command character"# @todo check for improper format# hardcoding dry run with a magic variable?# that's a choice.# destructive by default refactoring should be hard.if [ "${@:2:5}" == "run" ]; thenlt "running whatever's next"fififi# @todo exit trapping}lt "@function:mkrepo loaded"function selfTest {# todo shellchecklt "not yet implemented"}lt "@function:selfTest loaded"
# 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 usablealias nano="nano --nowrap --backup --positionlog --autoindent --linenumbers --softwrap --tabsize 3"# easy ssh key stuffsalias 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)'