Skip to content

Commit a6c318d

Browse files
committed
Improve bosh scp -h
- It is non-obvious how to compose remote path references for the `bosh scp` command. This change provides a minimal example of a remote path reference (`:/some/remote/path`) when help for scp is invoked. This example should be sufficient to allow a user to guess at what this command wants in order to target a remote path. It directs users to the documentation for further examples (as there are some other "special" parameters one can use with these path arguments that are not enumerated in the CLI help).
1 parent e67ae64 commit a6c318d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/opts/opts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ type SCPOpts struct {
10191019
}
10201020

10211021
type SCPArgs struct {
1022-
Paths []string `positional-arg-name:"PATH"`
1022+
Paths []string `positional-arg-name:"PATH" description:"Strings referencing remote (e.g. \":/some/remote/path\" -- \"user@host\" may be omitted) or local paths (e.g. \"./some/local/path\"). See CLI documentation for more examples."`
10231023
}
10241024

10251025
type GatewayFlags struct {

cmd/opts/opts_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,7 @@ var _ = Describe("Opts", func() {
29122912

29132913
Describe("Paths", func() {
29142914
It("contains desired values", func() {
2915-
Expect(getStructTagForName("Paths", opts)).To(Equal(`positional-arg-name:"PATH"`))
2915+
Expect(getStructTagForName("Paths", opts)).To(ContainSubstring(`positional-arg-name:"PATH"`))
29162916
})
29172917
})
29182918
})

0 commit comments

Comments
 (0)