Skip to content

Commit

Permalink
Accept unqouted strings for query
Browse files Browse the repository at this point in the history
  • Loading branch information
kajogo777 committed Dec 19, 2024
1 parent 53a5a3a commit 9d0bfc3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ pub enum Commands {
},

/// Query your configurations
Query { query: String },
Query {
#[arg(trailing_var_arg = true)]
query: Vec<String>,
},
// /// Deploy your app
// Deploy,

Expand Down Expand Up @@ -177,7 +180,7 @@ impl Commands {
}
Commands::Query { query } => {
if let Ok(client) = Client::new(&config) {
match client.query_blocks(&query).await {
match client.query_blocks(&query.join(" ")).await {
Ok(data) => println!("{}", data.to_text()),
Err(e) => eprintln!("Failed to query blocks {}", e),
};
Expand Down

0 comments on commit 9d0bfc3

Please sign in to comment.