-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpwb_sources.1
More file actions
67 lines (65 loc) · 1.4 KB
/
Copy pathpwb_sources.1
File metadata and controls
67 lines (65 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.TH pwb_sources 1 2025-03-05
.mso gproto.tmac
.SH NAME
.B pwb_sources
\- tool for learning about and using canned
.b pwb
solutions
.SH SYNOPSIS
.PP
.B pwb_sources
.br
.B pwb_sources
.RI [ "function_name ..." ]
.SH DESCRIPTION
.PP
The Bash scipt
.B pwb_sources
is a simple Bash script that runs in one of two modes,
.BR "discovery mode " and " source mode" .
.SH DISCOVERY MODE
.B Discovery mode
is an interactive mode that runs when
.B pwb_sources
is called without any arguments.
.PP
It show the list of available source functions on the left,
with a brief summary of the selected function on the right.
.PP
Navigation is done with arrow keys, and other active keys
are
.TP
.RB \(lq ? \(rq
for a help display
.TP
.RB \(lq q \(rq
to exit the interactive mode
.TP
.RB \(lq a \(rq
to show a simple synopsis
.TP
.RB \(lq m \(rq
to show a man page with usage details and code for an example script.
.TP
.RB \(lq s \(rq
to view the function's source code
.SH SOURCE MODE
.PP
This mode generates a short code fragment that checks for, and
includes if missing, a list of source functions.
The code fragment will be placed in the Bash source file on
the first pass of the interpreter.
.PP
Using
.B all
as the source name will result in code that loads every
available source script.
.SH EXAMPLE
.PP
.EX
\(sh!/usr/bin/env bash
enable pwb
source <( pwb_sources pwb_exit_on_error pwb_print_array )
# alternative:
# source <( pwb_sources all )
.EE