summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-02-23 13:15:18 +0800
committerGitHub <noreply@github.com>2024-02-23 13:15:18 +0800
commit763841212826142ce248ef3d94524424c6316b0b (patch)
tree6805fb523b3fa149744d8534928941a023e0d149 /src/cli.rs
parent6c0204e6965bf13c3d883ea5fa65d52415acd530 (diff)
downloadaichat-763841212826142ce248ef3d94524424c6316b0b.tar.gz
feat: support `-e/--execute` to execute shell command (#318)
Diffstat (limited to 'src/cli.rs')
-rw-r--r--src/cli.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 7e1229d..808602e 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -12,6 +12,9 @@ pub struct Cli {
/// Create or reuse a session
#[clap(short = 's', long)]
pub session: Option<Option<String>>,
+ /// Execute commands using natural language
+ #[clap(short = 'e', long)]
+ pub execute: bool,
/// Attach files to the message to be sent.
#[clap(short = 'f', long, num_args = 1.., value_name = "FILE")]
pub file: Option<Vec<String>>,
@@ -43,6 +46,7 @@ pub struct Cli {
#[clap(long)]
pub list_sessions: bool,
/// Input text
+ #[clap(trailing_var_arg = true)]
text: Vec<String>,
}