summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorJohn Letey <30328854+johnletey@users.noreply.github.com>2019-08-12 18:42:33 +0100
committerMatan Kushner <hello@matchai.me>2019-08-12 13:42:33 -0400
commit82cf484cedd0e989b39af760d6cc83b500454610 (patch)
tree7b76247043084608c947933ea0e7f1704a1a6b7d /src/main.rs
parent3f6fe50adb98ded2c7f90a581d2b8e1e88cde7e2 (diff)
feat: Implement the prompt module for jobs (#85)
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index fa6f1488b..c95b5fd21 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -43,6 +43,13 @@ fn main() {
.help("The execution duration of the last command, in seconds")
.takes_value(true);
+ let jobs_arg = Arg::with_name("jobs")
+ .short("j")
+ .long("jobs")
+ .value_name("JOBS")
+ .help("The number of currently running jobs")
+ .takes_value(true);
+
let matches = App::new("starship")
.about("The cross-shell prompt for astronauts. ☄🌌️")
// pull the version number from Cargo.toml
@@ -61,7 +68,8 @@ fn main() {
.about("Prints the full starship prompt")
.arg(&status_code_arg)
.arg(&path_arg)
- .arg(&cmd_duration_arg),
+ .arg(&cmd_duration_arg)
+ .arg(&jobs_arg),
)
.subcommand(
SubCommand::with_name("module")
@@ -73,7 +81,8 @@ fn main() {
)
.arg(&status_code_arg)
.arg(&path_arg)
- .arg(&cmd_duration_arg),
+ .arg(&cmd_duration_arg)
+ .arg(&jobs_arg),
)
.get_matches();