xref: /freebsd/usr.sbin/bsdconfig/includes/USAGE (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1ad8f8a1fSDevin Teske# Copyright (c) 2013 Devin Teske
2ad8f8a1fSDevin Teske# All rights reserved.
3ad8f8a1fSDevin Teske#
4ad8f8a1fSDevin Teske# Redistribution and use in source and binary forms, with or without
5ad8f8a1fSDevin Teske# modification, are permitted provided that the following conditions
6ad8f8a1fSDevin Teske# are met:
7ad8f8a1fSDevin Teske# 1. Redistributions of source code must retain the above copyright
8ad8f8a1fSDevin Teske#    notice, this list of conditions and the following disclaimer.
9ad8f8a1fSDevin Teske# 2. Redistributions in binary form must reproduce the above copyright
10ad8f8a1fSDevin Teske#    notice, this list of conditions and the following disclaimer in the
11ad8f8a1fSDevin Teske#    documentation and/or other materials provided with the distribution.
12ad8f8a1fSDevin Teske#
13ad8f8a1fSDevin Teske# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14ad8f8a1fSDevin Teske# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15ad8f8a1fSDevin Teske# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16ad8f8a1fSDevin Teske# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17ad8f8a1fSDevin Teske# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18ad8f8a1fSDevin Teske# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19ad8f8a1fSDevin Teske# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20ad8f8a1fSDevin Teske# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21ad8f8a1fSDevin Teske# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22ad8f8a1fSDevin Teske# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23ad8f8a1fSDevin Teske# SUCH DAMAGE.
24ad8f8a1fSDevin Teske#
25ad8f8a1fSDevin Teske
26ad8f8a1fSDevin TeskeUsage: bsdconfig @PROGRAM_NAME@ [OPTIONS] [include ...]
27ad8f8a1fSDevin Teske
28ad8f8a1fSDevin TeskeOPTIONS:
29ad8f8a1fSDevin Teske	-a    Always use color even when output is not to a terminal.
30*630c6be9SDevin Teske	-d    Print description for each function selected. Implies `-f'.
31ad8f8a1fSDevin Teske	-f    Show functions for selected includes.
32ad8f8a1fSDevin Teske	-F pattern
33ad8f8a1fSDevin Teske	      If `-f', only print functions matching pattern. Without `-f'
34ad8f8a1fSDevin Teske	      print only includes containing functions matching pattern.
35ad8f8a1fSDevin Teske	-h    Print this usage statement and exit.
36ad8f8a1fSDevin Teske	-n    Disable the use of color.
37ad8f8a1fSDevin Teske
38ad8f8a1fSDevin TeskeEXAMPLES:
39ad8f8a1fSDevin Teske	View a list of available includes:
40ad8f8a1fSDevin Teske
41ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@
42ad8f8a1fSDevin Teske
43ad8f8a1fSDevin Teske	View functions for all available includes (function names are
44ad8f8a1fSDevin Teske	highlighted):
45ad8f8a1fSDevin Teske
46ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@ -f
47ad8f8a1fSDevin Teske
48ad8f8a1fSDevin Teske	View functions with less(1) (function names are not highlighted):
49ad8f8a1fSDevin Teske
50ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@ -f | less
51ad8f8a1fSDevin Teske
52ad8f8a1fSDevin Teske	View functions with less(1) and color:
53ad8f8a1fSDevin Teske
54ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@ -af | less -R
55ad8f8a1fSDevin Teske
56ad8f8a1fSDevin Teske	View functions from `common.subr':
57ad8f8a1fSDevin Teske
58ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@ common.subr
59ad8f8a1fSDevin Teske
60ad8f8a1fSDevin Teske	NB: The `-f' flag is implied when given an include.
61ad8f8a1fSDevin Teske
62ad8f8a1fSDevin Teske	Show only functions containing the word `show' in common.subr:
63ad8f8a1fSDevin Teske
64ad8f8a1fSDevin Teske		bsdconfig @PROGRAM_NAME@ -F show common
65ad8f8a1fSDevin Teske
66ad8f8a1fSDevin Teske	NB: The `.subr' suffix on the end of the include is optional.
67924d4590SDevin Teske
68924d4590SDevin Teske	Show descriptions of each of the `show' functions:
69924d4590SDevin Teske
70*630c6be9SDevin Teske		bsdconfig @PROGRAM_NAME@ -dF show
71