Skip to content

Commit 8662a43

Browse files
committed
Update documentation for shadowenv exec
This change updates the documentation to be more explicit about where to put command and arguments. The previous documentation suggested that program arguments need to be specified after a `--`. But it's actually both the command name and the arguments. The old text: $ shadowenv exec --help ... USAGE: shadowenv exec [OPTIONS] <child-argv0|child-argv> [child-argv0] [-- <child-argv>...] ARGS: <child-argv0> If the command takes no arguments, it can be passed directly as the last arugment. <child-argv>... If the command requires arguments, they must all be passed after a --. This is in contrast of how it actually works. Bad: $ shadowenv exec ls -- / error: The argument '<child-argv>...' cannot be used with one or more of the other specified arguments Good: $ shadowenv exec -- ls / Applications cores etc ...
1 parent 3c6b11d commit 8662a43

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

man/man1/shadowenv.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.TH SHADOWENV 1
22
.SH NAME
3-
shadowenv \- maninpulate environment variables as you change directories
3+
shadowenv \- manipulate environment variables as you change directories
44
.SH SYNOPSIS
55
\fBshadowenv\fR [\fB\-h\fR|\fB\-V\fR] \fIsubcommand\fR
66
.SH DESCRIPTION
@@ -26,11 +26,11 @@ Instead of searching from the current directory for a .shadowenv.d, search from
2626

2727
.TP
2828
\fBchild-argv0\fR
29-
If the command doesn't need arguments, it can be passed directly as the last arugment.
29+
If the command doesn't need arguments, it can be passed directly as the last argument.
3030

3131
.TP
3232
\fBchild-argv...\fR
33-
If the command requires arguments, they must all be passed after a '--'.
33+
If the command requires arguments, the command and all arguments must be passed after a '--'.
3434

3535
.SS \fBhook\fR [FLAGS] [OPTIONS]
3636
Runs the shell hook. You shouldn't need to run this manually; instead, source the output of \fBshadowenv init\fR to create the shell hooks that will use this command.

src/cli.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ pub struct ExecCmd {
2020
#[arg(long)]
2121
pub dir: Option<String>,
2222

23-
/// The command to execute.
23+
/// The command to execute if there are no arguments.
2424
pub cmd_argv0: Option<String>,
2525

26-
/// The arguments to the command, if any.
26+
/// The command and arguments if it has any.
2727
#[arg(last = true)]
2828
pub cmd_argv: Vec<String>,
2929
}

0 commit comments

Comments
 (0)