You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/CLI-Commands.cram.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,13 @@
11
11
If no arguments are given, `doco` outputs the current target service list, one item per line, and returns success. If there is no current target, however, a usage message is output:
12
12
13
13
~~~shell
14
-
$ (doco example1)# explicit services/groups, map to output names
14
+
$ doco example1 # explicit services/groups, map to output names
15
15
example1
16
16
17
-
$ (doco --all)# output current target set
17
+
$ doco --all # output current target set
18
18
example1
19
19
20
-
$ (doco --)# empty target set; outputs nothing
20
+
$ doco -- # empty target set; outputs nothing
21
21
22
22
$ (command doco) # no set defined = usage + error
23
23
Usage: doco command args...
@@ -29,7 +29,7 @@ If no arguments are given, `doco` outputs the current target service list, one i
29
29
Shorthand for `--with-default cmd-default --require-services`*flag subcommand...*. That is, if the current service set is empty, it defaults to the `cmd-default` target, if defined. The number of services is then verified with `--require-services` before executing *subcommand*. This makes it easy to define new subcommands that work on a default container or group of containers. (For example, the `doco sh` command is defined as `doco cmd 1 exec bash "$@"` -- i.e., it runs on exactly one service, defaulting to the `cmd-default` group.)
30
30
31
31
~~~shell
32
-
$ (doco cmd 1 test)
32
+
$ doco cmd 1 test
33
33
no services specified fortest
34
34
[64]
35
35
@@ -53,35 +53,35 @@ Copy a file in or out of a service container. Functions the same as `docker cp`
Unrecognized option --nosuch; see 'docker help cp'
74
74
[64]
75
75
76
-
$ (doco cp foo bar baz)
76
+
$ doco cp foo bar baz
77
77
cp requires two non-option arguments (src and dest)
78
78
[64]
79
79
80
-
$ (doco cp foo bar)
80
+
$ doco cp foo bar
81
81
cp: either source or destination must contain a :
82
82
[64]
83
83
84
-
$ (doco cp foo:bar baz:spam)
84
+
$ doco cp foo:bar baz:spam
85
85
cp: only one argument may contain a :
86
86
[64]
87
87
~~~
@@ -114,18 +114,18 @@ Any functions defined via jqmd's facilities (`DEFINES`, `IMPORTS`, `jq defs` bl
114
114
`doco sh`*args...* executes `bash`*args* in the specified service's container. If no service is specified, it defaults to the `cmd-default` target. Multiple services are not allowed, unless you preface `sh` with `foreach`.
115
115
116
116
~~~shell
117
-
$ (doco sh)
117
+
$ doco sh
118
118
no services specified forexec
119
119
[64]
120
120
121
121
$ GROUP tango := alfa foxtrot
122
-
$ (doco tango sh)
122
+
$ doco tango sh
123
123
exec cannot be used on multiple services
124
124
[64]
125
125
126
126
$ doco alfa sh
127
127
docker-compose exec alfa bash
128
128
129
-
$ (GROUP cmd-default += foxtrot; doco sh -c 'echo foo')
129
+
$ GROUP cmd-default += foxtrot; doco sh -c 'echo foo'
0 commit comments