Git Product home page Git Product logo

bash-boost's People

Contributors

e8y avatar tomocafe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bash-boost's Issues

relpath bug

bb_expect "$(bb_relpath "/foo/bar/baz" "/foo/bar")" "baz"

fatal error: expected baz got /baz

Set up CI/CD

Publish versioning standards

What constitutes a patch, minor, or major release.

Breaking changes or deprecation can only occur in major releases. Add latest link for each major release.

Add expressive module

For functions that do not add any functionality, but make using existing functionality more human-readable, less terse.

Example: bb_expressive_is_directory instead of test -d

util/time

Date and time utilities leveraging builtin printf interface to strftime.

cli/input

getinput to poll for input, optional validation function
yn to ask yes/no

Add bb_forkterm

Spawn a new terminal instance inheriting the current shell's environment.

Add round-up offset feature to bb_now

Use ^ to denote rounding up to the nearest, e.g. +0d^ means the upcoming 00:00, +1h^ at 06:30 means 08:00, -1h^ at 06:30 means 06:00, etc.

^d, ^h can be shorthand for +0d^, +0h^ (etc.)

Style standards

  • Public function : bb_ (e.g. bb_load)
  • Public variable : BB_ (e.g. BB_ROOT)
  • Internal function: _bb_ (e.g. _bb_on_first_load)
  • Internal variable: __bb_ (e.g. __bb_true)

If you type bb<TAB>, we don't want it to show a bunch of internal functions that aren't useful to an end user. For example, bb_on_first_load

Function contracts

# functionname REQARG ... [OPTARG ...]
# Brief description
# Arguments: (*required)
# * REQARG: description
#   OPTARG: description
# Returns: description
# Consumes variables:
# - VAR1: description
# Emits variables:
# - VAR2: description
function bb_module_pkg_functionname () {

Checker / linter

Make sure no collision with function names between modules, packages, etc.

list sort

sort [SORT_OPTS --] ITEMS ...

Uses GNU coreutils sort with SORT_OPTS passed directly to sort.

If -- is omitted, sort is invoked without options (default).

Add required args for cli/arg

bb_requiredarg NAME DESCRIPTION

Retrieve with bb_getopt by name.

Issue bb_errusage during bb_parseargs if required arguments are unset.

Markdown documentation

All of the information in the function contract (can be auto-extracted) plus more detailed explanation, examples, notes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.