diff options
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 7 |
3 files changed, 8 insertions, 3 deletions
@@ -259,7 +259,7 @@ checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" | |||
259 | 259 | ||
260 | [[package]] | 260 | [[package]] |
261 | name = "pista" | 261 | name = "pista" |
262 | version = "0.1.4" | 262 | version = "0.1.5" |
263 | dependencies = [ | 263 | dependencies = [ |
264 | "clap", | 264 | "clap", |
265 | "colored", | 265 | "colored", |
@@ -1,6 +1,6 @@ | |||
1 | [package] | 1 | [package] |
2 | name = "pista" | 2 | name = "pista" |
3 | version = "0.1.4" | 3 | version = "0.1.5" |
4 | authors = ["NerdyPepper <[email protected]>"] | 4 | authors = ["NerdyPepper <[email protected]>"] |
5 | edition = "2018" | 5 | edition = "2018" |
6 | description = "A simple bash prompt for programmers" | 6 | description = "A simple bash prompt for programmers" |
diff --git a/src/main.rs b/src/main.rs index 1a77759..6ccca7b 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,6 +3,8 @@ mod prompt_char; | |||
3 | mod vcs; | 3 | mod vcs; |
4 | mod venv; | 4 | mod venv; |
5 | 5 | ||
6 | use std::env; | ||
7 | |||
6 | use clap::{App, Arg}; | 8 | use clap::{App, Arg}; |
7 | use colored::*; | 9 | use colored::*; |
8 | 10 | ||
@@ -36,7 +38,10 @@ fn pista(zsh: bool) -> String { | |||
36 | Some(c) => c, | 38 | Some(c) => c, |
37 | None => "[directory does not exist]".color("red"), | 39 | None => "[directory does not exist]".color("red"), |
38 | }; | 40 | }; |
39 | let (branch, status) = vcs::vcs_status().unwrap_or(("".into(), "".into())); | 41 | let (branch, status) = match env::var("DISABLE_VCS").unwrap_or("0".into()).as_ref() { |
42 | "0" => vcs::vcs_status().unwrap_or(("".into(), "".into())), | ||
43 | _ => ("".into(), "".into()) | ||
44 | }; | ||
40 | let venv = venv::get_name(); | 45 | let venv = venv::get_name(); |
41 | let prompt_char = prompt_char::get_char(); | 46 | let prompt_char = prompt_char::get_char(); |
42 | if zsh { | 47 | if zsh { |