https://github.com/co2-git/lib
A bash utility framework
https://github.com/co2-git/lib
Last synced: about 1 year ago
JSON representation
A bash utility framework
- Host: GitHub
- URL: https://github.com/co2-git/lib
- Owner: co2-git
- Created: 2013-03-15T10:37:38.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-26T16:36:27.000Z (about 13 years ago)
- Last Synced: 2025-03-27T11:44:50.021Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 297 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lib
===
A command line framework in bash offering a set of utilities/helpers to ease coding in bash.
## About
lib offers a set of functions in bash that are helpers that can be called from the terminal or be included in the scope of a bash script. For better usability, functions are ordered by namespsaces.
## Usage
lib [...]
lib --all # view all functions
lib --all --namespace # view all namespaces
lib --all --namespace Regex # view all functions under the namespace Regex
lib --all Array.join # view documentation for specific function (here Array.join)
## Terminal user story
dude@machine ~ $ `lib Text bold This text will be output in bold\!`
## Script integration user story
#!/bin/bash
## Import lib into your script's scope
lib --import
## Now you call any lib function you want, it will be called within the process
lib test This is a test
lib Text color green This text will appear in green
lib Array join , 1 2 3 4
## Installation
### As sudo (global install)
git clone https://github.com/co2-git/lib.git
sudo ln -s lib/lib.sh /usr/bin/lib
### Local install
git clone https://github.com/co2-git/lib.git
echo "alias lib='/path/to/lib/lib.sh'" >> ~/.bashrc
source ~/.bashrc