Skip to content

Commit

Permalink
Updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Oct 11, 2022
1 parent 9e77ce9 commit 424198a
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 66 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[separator=—]
= Bashmatic® — BASH-based DSL helpers for humans, sysadmins, and fun.
// vim: ft=asciidoc
:author: Version v3.0.3
:author: Version v3.0.5
:doctype: book
:source-highlighter: rouge
:rouge-style: base16.monokai
Expand Down
Binary file modified README.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [v3.0.5](https://github.com/kigster/bashmatic/tree/v3.0.5) (2022-10-11)

[Full Changelog](https://github.com/kigster/bashmatic/compare/v3.0.4...v3.0.5)

## [v3.0.4](https://github.com/kigster/bashmatic/tree/v3.0.4) (2022-10-03)

[Full Changelog](https://github.com/kigster/bashmatic/compare/v3.0.3...v3.0.4)
Expand Down
138 changes: 73 additions & 65 deletions doc/FUNCTIONS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* xref:#module-asciidoc[asciidoc]
* xref:#module-audio[audio]
* xref:#module-aws[aws]
* xref:#module-background[background]
* xref:#module-bashit[bashit]
* xref:#module-bashmatic[bashmatic]
* xref:#module-brew[brew]
Expand Down Expand Up @@ -913,70 +912,6 @@ aws.s3.upload ()
----


=== Module `background`

==== `background.log`

[source,bash]
----
background.log ()
{
local index="${1:-0}"
printf "${background_log/{{index}}/${index}}"
}
----

==== `background.run`

[source,bash]
----
background.run ()
{
for command in "$@"
do
local index=${#running_jobs[@]}
local log="$(background.log "${index}")"
( ${command} 2>&1 | tee -a "${log}" ) & running_jobs[$!]=-1
done
}
----

==== `background.sigchld`

[source,bash]
----
background.sigchld ()
{
for pid in "${!running_jobs[@]}"
do
if [ ! -d "/proc/$pid" ]; then
wait "${pid}"
local code="$?"
running_jobs["${pid}"]=${code}
fi
done
}
----

==== `background.wait`

[source,bash]
----
background.wait ()
{
local timeout
echo Starting background processes with pidS ${!pidS[@]}
echo Starting dd
timeout 15s dd if=/dev/zero of=/dev/null
echo dd terminated
}
----


=== Module `bashit`

==== `bashit-activate`
Expand Down Expand Up @@ -7382,6 +7317,28 @@ hr.colored ()
----

==== `inline.not-ok`

[source,bash]
----
inline.not-ok ()
{
printf " ${txtwht}${bakred} ✘ ${clr} "
}
----

==== `inline.ok`

[source,bash]
----
inline.ok ()
{
printf " ${txtblk}${bakgrn} ✔︎ ${clr} "
}
----

==== `left`

[source,bash]
Expand Down Expand Up @@ -7587,6 +7544,46 @@ output.reset-min-max-width ()
----

==== `output.screen-height.actual`

[source,bash]
----
output.screen-height.actual ()
{
local h
util.os
if [[ ${AppCurrentOS} =~ darwin ]]; then
h="$(.output.stty.field rows)"
else
if [[ ${AppCurrentOS} =~ linux ]]; then
h="$(stty -a 2>/dev/null | grep rows | awk '{print $5}' | sedx 's/;//g')"
fi
fi
printf -- "%d" "$h"
}
----

==== `output.screen-width.actual`

[source,bash]
----
output.screen-width.actual ()
{
local w
util.os
if [[ ${AppCurrentOS} =~ darwin ]]; then
w="$(.output.stty.field columns)"
else
if [[ ${AppCurrentOS} =~ linux ]]; then
w="$(stty -a 2>/dev/null | grep columns | awk '{print $7}' | sedx 's/;//g')"
fi
fi
printf -- "%d" "$w"
}
----

==== `output.set-max-width`

[source,bash]
Expand Down Expand Up @@ -7654,6 +7651,17 @@ screen.height ()
----

==== `screen.height.actual`

[source,bash]
----
screen.height.actual ()
{
.output.screen-height
}
----

==== `screen.width`

[source,bash]
Expand Down
Binary file modified doc/USAGE.pdf
Binary file not shown.

0 comments on commit 424198a

Please sign in to comment.