aboutsummaryrefslogtreecommitdiff
IDIOMS(7)                  Mutineer's Guide - idioms                 IDIOMS(7)



NAME
       idioms - overview of idiomatic utilities for scripting

DESCRIPTION
       idioms is a set of useful utilities and functions designed to make
       scripting more idiomatic.  It’s akin to moreutils, but the main goal is
       to standardize common tasks, improve code smell, and also make
       automating things like safely failing when running commands easier.

       idioms consists of these parts:

       backslash(1)
           combine lines that end with a backslash

       idioms(1)
           setup usage of idioms(3) functions in a script

       idioms(3)
           useful functions that work within a script runtime

       integer(1)
           check if all given arguments are positve integers

       lastarg(1)
           print the last argument given

       match(1)
           succeed if all strings match a given pattern

       ratelimit(1)
           limit how often a command can be ran

DEPENDENCIES
       Build

       •   make(1)

       Runtime

       •   A POSIX-compliant shell. (ex. bash(1), dash(1), mksh(1), busybox
           ash, etc.)

           •   An implementation of the POSIX-defined printf command. This
               might be provided by the shell but it can also just be a
               regular command without issue.

       •   If you wish to use the color functionality, you need a tput(1)
           command, likely provided by ncurses
           <https://invisible-island.net/ncurses/> or NetBSD’s curses
           <https://github.com/sabotage-linux/netbsd-curses>.

       •   For match(1): A POSIX-compliant grep.

       Development

       •   shellspec <https://github.com/shellspec/shellspec>, if you wish to
           run tests.

       •   shellcheck(1) <https://github.com/koalaman/shellcheck>, if you wish
           to lint files.

       •   asciidoctor(1) <https://asciidoctor.org>, if you wish to regenerate
           manual pages (HTML, or manpage format).

CONTRIBUTING
       The canonical URL of this repository is
       <https://git.mutiny.red/mutiny/idioms>.  Submit patches and bugs to
       <kylie@somas.is>.

       There is also an IRC channel for idioms and other projects at
       <irc://irc.freenode.net/#mutiny>.  Please don’t hesitate to message if
       you need help.

LICENSE
       idioms is in the public domain.

       To the extent possible under law, Kylie McClain has waived all
       copyright and related or neighboring rights to this work.

        <http://creativecommons.org/publicdomain/zero/1.0/>



Mutiny                            2020-07-13                         IDIOMS(7)