Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
67e3a383d7 | ||
![]() |
f8ff3fe5b9 |
6 changed files with 50 additions and 1 deletions
18
.bashrc
Executable file
18
.bashrc
Executable 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
0
LICENSE
Normal file → Executable file
0
NOTES
Normal file → Executable file
0
NOTES
Normal file → Executable file
4
README.md
Normal file → Executable file
4
README.md
Normal file → Executable file
|
@ -1,3 +1,5 @@
|
||||||
# Bash-Stash
|
# 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
6
modules/moo.bash
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Test module
|
||||||
|
|
||||||
|
function moo () {
|
||||||
|
echo "MOOOO!! $1"
|
||||||
|
}
|
23
test.bash
Executable file
23
test.bash
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue