Skip to content

Commit d37d28a

Browse files
committed
Speed up more tests
1 parent f27640f commit d37d28a

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

specs/CLI-Commands.cram.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
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:
1212

1313
~~~shell
14-
$ (doco example1) # explicit services/groups, map to output names
14+
$ doco example1 # explicit services/groups, map to output names
1515
example1
1616

17-
$ (doco --all) # output current target set
17+
$ doco --all # output current target set
1818
example1
1919

20-
$ (doco --) # empty target set; outputs nothing
20+
$ doco -- # empty target set; outputs nothing
2121

2222
$ (command doco) # no set defined = usage + error
2323
Usage: doco command args...
@@ -29,7 +29,7 @@ If no arguments are given, `doco` outputs the current target service list, one i
2929
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.)
3030

3131
~~~shell
32-
$ (doco cmd 1 test)
32+
$ doco cmd 1 test
3333
no services specified for test
3434
[64]
3535

@@ -53,35 +53,35 @@ Copy a file in or out of a service container. Functions the same as `docker cp`
5353
$ doco cp bar:/spam -
5454
docker cp clicommandscrammd_bar_1:/spam -
5555

56-
$ (doco cp :x y)
56+
$ doco cp :x y
5757
no services specified for cp
5858
[64]
5959

60-
$ (GROUP shell-default := bravo; doco cp :x y)
60+
$ GROUP shell-default := bravo; doco cp :x y
6161
docker cp clicommandscrammd_bravo_1:x /*/CLI-Commands.cram.md/y (glob)
6262

63-
$ (GROUP shell-default := bravo; LOCO_PWD=$PWD/t doco bravo cp y :x)
63+
$ GROUP shell-default := bravo; LOCO_PWD=$PWD/t doco bravo cp y :x
6464
docker cp /*/CLI-Commands.cram.md/t/y clicommandscrammd_bravo_1:x (glob)
6565

6666
# Bad usages
6767

68-
$ (SERVICES a b; doco a b cp foo :bar)
68+
$ doco a b cp foo :bar
6969
cp cannot be used on multiple services
7070
[64]
7171

72-
$ (doco cp --nosuch)
72+
$ doco cp --nosuch
7373
Unrecognized option --nosuch; see 'docker help cp'
7474
[64]
7575

76-
$ (doco cp foo bar baz)
76+
$ doco cp foo bar baz
7777
cp requires two non-option arguments (src and dest)
7878
[64]
7979

80-
$ (doco cp foo bar)
80+
$ doco cp foo bar
8181
cp: either source or destination must contain a :
8282
[64]
8383

84-
$ (doco cp foo:bar baz:spam)
84+
$ doco cp foo:bar baz:spam
8585
cp: only one argument may contain a :
8686
[64]
8787
~~~
@@ -114,18 +114,18 @@ Any functions defined via jqmd's facilities (`DEFINES`, `IMPORTS`, `jq defs` bl
114114
`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`.
115115

116116
~~~shell
117-
$ (doco sh)
117+
$ doco sh
118118
no services specified for exec
119119
[64]
120120

121121
$ GROUP tango := alfa foxtrot
122-
$ (doco tango sh)
122+
$ doco tango sh
123123
exec cannot be used on multiple services
124124
[64]
125125

126126
$ doco alfa sh
127127
docker-compose exec alfa bash
128128

129-
$ (GROUP cmd-default += foxtrot; doco sh -c 'echo foo')
129+
$ GROUP cmd-default += foxtrot; doco sh -c 'echo foo'
130130
docker-compose exec foxtrot bash -c echo\ foo
131131
~~~

0 commit comments

Comments
 (0)