Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
juanibiapina committed May 16, 2024
1 parent 31f2df9 commit e9c1b33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/help.bats
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The help section can span multiple lines."
run main --help directory

assert_success
assert_output "Usage: main directory [OPTIONS] [commands_with_args]...
assert_output "Usage: main directory [commands_with_args]...
A directory subcommand
Expand Down
5 changes: 4 additions & 1 deletion src/commands/directory.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::fs;
use std::path::PathBuf;

use clap::Arg;

use crate::commands::subcommand;
use crate::commands::Command;
use crate::config::Config;
Expand All @@ -19,7 +21,8 @@ impl<'a> DirectoryCommand<'a> {
pub fn new(name: &str, names: Vec<String>, path: PathBuf, config: &'a Config) -> Result<Self> {
let readme_path = path.join("README");

let mut command = config.user_cli_command(name);
let mut command = config.base_command(name);
command = command.arg(Arg::new("commands_with_args").trailing_var_arg(true).allow_hyphen_values(true).num_args(..));

if readme_path.exists() {
let docs = parser::extract_docs(&readme_path);
Expand Down

0 comments on commit e9c1b33

Please sign in to comment.