Skip to content

Commit

Permalink
Use vector of strings as command for add
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Dec 17, 2019
1 parent a667be5 commit d1db5b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <contact@arne.beer>"]
homepage = "https://github.com/nukesor/pueue"
repository = "https://github.com/nukesor/pueue"
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <contact@arne.beer>
Expand Down
4 changes: 2 additions & 2 deletions client/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub enum SubCommand {
Add {
/// The command that should be added
#[structopt()]
command: String,
command: Vec<String>,

/// Start the task immediately
#[structopt(name = "immediate", short, long)]
Expand Down Expand Up @@ -177,7 +177,7 @@ pub fn get_message_from_opt(opt: &Opt) -> Result<Message> {
"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,
}))
Expand Down

0 comments on commit d1db5b4

Please sign in to comment.