Skip to content

Commit d99f968

Browse files
committed
restructuring and refactoring of implementation with breaking syntax changes
Signed-off-by: Rob Frawley 2nd <rmf@src.run>
1 parent a431e05 commit d99f968

18 files changed

+1060
-853
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text=auto eol=lf whitespace=tabwidth=4
2+
*.bash diff=bash
3+
/test export-ignore
4+
/.gitmodules export-ignore
5+
/.gitattributes export-ignore
6+
/.travis.yml export-ignore

.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.travis.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
---
22

3+
##
4+
## This file is part of the `src-run/bash-bright-library` package.
5+
##
6+
## (c) Rob Frawley 2nd <rmf@src.run>
7+
##
8+
## For the full copyright and license information, view the LICENSE.md
9+
## file distributed with this source code.
10+
##
11+
312
language: bash
413

514
addons:
6-
apt:
7-
packages:
8-
- realpath
15+
apt:
16+
packages:
17+
- realpath
918

1019
env:
1120
- SHUNIT_COLOR=always
1221

1322
matrix:
14-
include:
15-
- script:
16-
- bash test/test_bright-apis.bash
17-
- script:
18-
- shellcheck -x bright.bash
23+
include:
24+
- script:
25+
- bash test/bright-test.bash
26+
- script:
27+
- shellcheck -s bash -x bright.bash test/bright-test.bash

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# [src-run] bright-library
1+
# [src-run] bash-bright-library
22

33
## Overview
44

55
[Welcome](https://src.run/go/readme_welcome)!
6-
The `bright-library` provides a light weight collection of bash functions to enable
6+
The `bash-bright-library` provides a light weight collection of bash functions to enable
77
basic console output styling.
88

99
### JTT
@@ -12,8 +12,8 @@ This package represents a single project within a
1212
[large collection](https://src.run/go/explore) of open-source code released
1313
under the *Scribe* namespace, comprised of framework-agnostic libraries,
1414
and a number of Symfony bundles. These projects are authored and maintained
15-
by [Rob Frawley 2nd](https://src.run/rmf) and
16-
[collaborators](https://src.run/bright-library/github_collaborators),
15+
by [Rob Frawley 2nd](https://src.run/rmf) and
16+
[collaborators](https://src.run/bash-bright-library/github_collaborators),
1717
often with the support of [Scribe Inc](https://src.run/go/scribe-home).
1818

1919
## Contributing
@@ -28,8 +28,8 @@ be joined using the following link
2828
### Issues
2929

3030
To report issues or request a new feature use
31-
[GitHub](https://src.run/bright-library/github_issues)
32-
or [GitLab](https://src.run/bright-library/gitlab_issues)
31+
[GitHub](https://src.run/bash-bright-library/github_issues)
32+
or [GitLab](https://src.run/bash-bright-library/gitlab_issues)
3333
to start a discussion. Include as much information as possible to aid in
3434
a quick resolution. Feel free to "ping" the topic if you don't get a
3535
response within a few days.
@@ -39,7 +39,7 @@ response within a few days.
3939
You created additional functionality during the use of this package? Send
4040
it back upstream! *Don't hesitate to submit a pull request!* Beyond the
4141
brief requirements outlined in the
42-
[contibuting guide](https://src.run/bright-library/contributing),
42+
[contibuting guide](https://src.run/bash-bright-library/contributing),
4343
your [imagination](https://src.run/go/readme_imagination)
4444
represents the only limitation.
4545

@@ -50,5 +50,5 @@ This project is licensed under the
5050
[FSF](https://src.run/go/fsf)-/[OSI](https://src.run/go/osi)-approved
5151
and [GPL](https://src.run/go/gpl)-compatible, permissive free software
5252
license. Review the
53-
[LICENSE](https://src.run/bright-library/license)
53+
[LICENSE](https://src.run/bash-bright-library/license)
5454
file distributed with this source code for additional information.

lib/_bright-apis_builds.bash

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
##
4-
## This file is part of the `src-run/bright-library` package.
4+
## This file is part of the `src-run/bash-bright-library` package.
55
##
66
## (c) Rob Frawley 2nd <rmf@src.run>
77
##
@@ -11,31 +11,28 @@
1111

1212

1313
#
14-
# create output control string with custom formatting
14+
# write raw string with custom formatting visible
1515
#
16-
# @param string $1 controls to apply
16+
# @param string ...$1 any of: message, replacements, styles, colors, and controls
1717
#
1818
# @return int
1919
#
2020

21-
function _cmd() {
22-
_builder_return "${@}" \
23-
&& _auto_nl \
21+
function _get() {
22+
_builder '@ctl:no-nl' '@ctl:no-reset' '@ctl:no-interpret' "${@}" \
2423
|| return ${?}
2524
}
2625

2726

2827
#
29-
# output string with custom formatting
28+
# write string with custom formatting parsed
3029
#
31-
# @param string $1 message to output
32-
# @param string $2 command(s) to apply
30+
# @param string ...$1 any of: message, replacements, styles, colors, and controls
3331
#
3432
# @return int
3533
#
3634

3735
function _out() {
38-
_builder_output "${@}" \
39-
&& _auto_nl \
36+
_builder '@ctl:auto-nl' '@ctl:auto-reset' '@ctl:interpret' "${@}" \
4037
|| return ${?}
4138
}

0 commit comments

Comments
 (0)