FasBashLib

A collection of many personal functions for modern Bash

OTHER License

Stars
9

FasBashLib - A collection of many personal functions for modern Bash

A collection of many personal functions for modern Bash to write safe and readable code quickly

They are grouped by function type, and some functions are specific to a particular system.

I like Arch Linux, so there may be many for it.

Features

These are only part of FasBashLib's main libraries.

  • Supports 3 coding styles, Upper camel case , Lower camel case, and Snake case
  • Select and build only the functions you need
  • Automatically generate documents from source code comments
  • Unique test tool specially designed
  • Safe and easy array operation (Array)
  • Batch analysis of URLs from standard input (URL)
  • Arch Linux-specific functions (Aur, ArchLinux, Pacman, SrcInfo)

Why?

Modern Bash is feature-rich, making it possible to write secure code compared to pure shells.

If you are coding utilizing these features, you will find yourself writing the same code over and over again.

Also, Bash has no type restrictions, so even something as simple as evaluating boolean values can become redundant if you consider safety.

This library has many functions, especially for arrays, that make it easy to write safe code that takes special characters such as whitespace into account.

Furthermore, shell scripts currently lack a system for managing and loading libraries in a consistent manner.

FasBashLib is modular and assists in adding and removing functions and loading them in various environments.

If you want to add your own functions, fork this project and place your shell scripts in src.

Testing, documentation generation, local installation, and dynamic loading from online are all supported.

Use it

See How to use it

Document

You can read the latest auto generated documents here.

Or download document from Release Page

Test

See How to test

Code examples

You can add your script to this list. Please send a Pull request.

Special thanks

FasBashLib is composed of these projects. Deepest thanks to their contributors!