Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Paul
67e3a383d7 First working copy of autoload 2022-06-12 13:26:38 -05:00
kake26
f8ff3fe5b9 Update 'README.md'
Updated readme
2021-09-25 23:43:46 +02:00
6 changed files with 50 additions and 1 deletions

18
.bashrc Executable file
View file

@ -0,0 +1,18 @@
#
# ~/.bashrc
#
# Stripped of its default items
function autoload {
#echo "Called by $(caller): Couldn't find ${BASH_COMMAND}"
if [[ -f modules/${BASH_COMMAND}.bash ]]
then
source modules/${BASH_COMMAND}.bash
${BASH_COMMAND}
else
echo "I can't find ${BASH_COMMAND}"
fi
}
trap autoload ERR

0
LICENSE Normal file → Executable file
View file

0
NOTES Normal file → Executable file
View file

4
README.md Normal file → Executable file
View file

@ -1,3 +1,5 @@
# Bash-Stash
A collection of console based bash scripts I've written at various times. It may include scripts written in other languages.
# Console
These are various useful console scripts.

6
modules/moo.bash Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
# Test module
function moo () {
echo "MOOOO!! $1"
}

23
test.bash Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
set -Eeuo pipefail
# 2>/dev/null
# Test file
function autoload {
#echo "Called by $(caller): Couldn't find ${BASH_COMMAND}"
if [[ -f modules/${BASH_COMMAND}.bash ]]
then
source modules/${BASH_COMMAND}.bash
${BASH_COMMAND}
else
echo "I can't find ${BASH_COMMAND}"
fi
}
trap autoload ERR
moo