The base bash shell directory and setup script for bash shell sourcing system
This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
David Kebler 8d8ade7810 Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
alias Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
app Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
archive Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
env Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
function Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
lang Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
misc Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
modules Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
README.md Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
options Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
setup.sh Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00
source-dir.func Initial commit of new shell sourcing system - base directory 2020-11-03 12:07:49 -08:00

README.md

Bash Shell Setup Repo

A better way to keep organized and share interactive (.bashrc) environment, aliases, functions, modules

Install

Clone to a directory

git clone https://git.kebler.net/bashrc <repo path> e.g. /opt/shell

now edit your ~/.bashrc with nano or other available editor

add this

export BASH_SHELL_REPO=<repo path>/setup.
source $BASH_SHELL_REPO/setup.sh

The idea is to keep the .bashrc file completely clean and manage this repo instead so you should really find a home for all the existing content of your .bashrc file within the repo

Every file in env functions,aliases and misc subdirectories will be sourced in that order (in setup.sh). Within each folder all files are sourced except ones ending with a .off extension, starting with . and the README.md file plus any in any subfolder except /archive or /dep

The sourced files in this repo should be NOT be user/machine/network specific

if you include any of these environment variables all files in there directories will be sourced where

export BASH_SHELL_USER= # will be in home/ export BASH_SHELL_MACHINE= #parent directory e.g. opt/shell/machine export BASH_SHELL_NETWORK= #parent directory e.g. opt/shell/network

if there is a script setup.sh in the root of these directoies it will be run. If not then all files no matter how deep will be sourced in alpha order order.

For those

If need to turn off a file just add .off to the file name rather than move or delete the file...simple.

If you are really done with something but want to keep a copy in the repo move it to /archive folder within the primary subfolders

if sourcing some file depends on another preface with numbers to put it before. Functions are all sourced before aliases so can be refered to there.

Be aware that an alias or function set in the repo could be subsuming some existing binary or script.