diff --git a/Cargo.toml b/Cargo.toml index 492b719e..72524f8d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pueue" description = "A cli tool for managing long running shell commands." -version = "0.0.2" +version = "0.0.3" authors = ["Arne Beer "] homepage = "https://github.com/nukesor/pueue" repository = "https://github.com/nukesor/pueue" diff --git a/README.md b/README.md index 8980e6a9..76c88f4a 100644 --- a/README.md +++ b/README.md @@ -54,8 +54,14 @@ There are three different ways to install Pueue. ## How to use it: -There is a help option (-h) for all commands. +For normal operation it's recommended to add an alias to your shell rc for `pueue add --`, e.g. `alias pad=pueue add --` + +To add a command just write: `pueue add -- ls -al` +The command will then be added and executed as if you executed it right now and then. +To get the status of currently running commands, just type `pueue status`. + +There is a help option (-h) for all commands. ``` Pueue client 0.1.0 Arne Beer diff --git a/client/cli.rs b/client/cli.rs index dc1c59ef..fb83f51b 100644 --- a/client/cli.rs +++ b/client/cli.rs @@ -11,7 +11,7 @@ pub enum SubCommand { Add { /// The command that should be added #[structopt()] - command: String, + command: Vec, /// Start the task immediately #[structopt(name = "immediate", short, long)] @@ -177,7 +177,7 @@ pub fn get_message_from_opt(opt: &Opt) -> Result { "Cannot parse current working directory (Invalid utf8?)" ))?; Ok(Message::Add(AddMessage { - command: command.to_string(), + command: command.join(" "), path: cwd.to_string(), start_immediately: *start_immediately, }))