-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devbox: add AppendScript method to ConfigShellCmds (#149)
This method takes a script as a string and appends it to the slice of shell commands in the config. From the docs: AppendScript appends each line of a script to s.Cmds. It also applies the following formatting rules: - Trim leading newlines from the script. - Trim trailing whitespace from the script. - If the first line of the script begins with one or more tabs ('\t'), then unindent each line by that same number of tabs. - Remove trailing whitespace from each line. Note that unindenting only happens when a line starts with at least as many tabs as the first line. If it starts with fewer tabs, then it is not unindented at all. See `config_test.go` for an example.
- Loading branch information
Showing
2 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters