@@ -160,6 +160,22 @@ under Bash 3.2, 4.2, 4.3, and 4.4 across OS X, Ubuntu Linux, Arch Linux, Alpine
160160Linux, FreeBSD 9.3, FreeBSD 10.3, and Windows 10 (using all the environments
161161described in the "Will this work on Windows?" section above).
162162
163+ #### Can I use it to write standalone programs that aren't project scripts?
164+
165+ Actually, yes. See the [ Standalone mode] ( #standalone-mode ) section below.
166+
167+ Also see the following question...
168+
169+ #### Can I have more than one ./go script in the same project source tree?
170+
171+ Yes. You can share one copy of the go-bash-framework sources, and even have
172+ common code in the ` lib/ ` directory, but set each script to use its own command
173+ scripts dir.
174+
175+ This may be especially useful if you're writing a [ standalone] ( #standalone-mode )
176+ program, in which one script provides the actual program interface, and the
177+ other provides the development-only interface.
178+
163179#### How is it tested?
164180
165181The project's own ` ./go test ` command does it all. Combined with automatic
@@ -298,6 +314,20 @@ To learn the API for adding tab completion to your own command scripts, run
298314` ./go help complete ` . You can also learn by reading the scripts for the builtin
299315commands.
300316
317+ #### Standalone mode
318+
319+ If you wish to use the framework to write a standalone program, rather than a
320+ project-specific development script, set ` _GO_STANDALONE ` in your top-level
321+ script to prevent alias commands, builtin commands, and plugin commands from
322+ showing up in ` help ` output or from being offered as tab completions. (` help `
323+ will still appear as a top-level tab completion.) All of these commands will
324+ still be available, but users won't be presented with them directly.
325+
326+ ` _GO_STANDALONE ` also prevents the script from setting ` PWD ` to ` _GO_ROOTDIR ` ,
327+ enabling the script to process relative file path arguments anywhere in the file
328+ system. Note that then you'll have to add ` _GO_ROOTDIR ` manually to any
329+ ` _GO_ROOTDIR ` -relative paths in your own scripts.
330+
301331#### Including common code
302332
303333There are a number of possible methods available for sharing code between
0 commit comments