diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Cargo.lock | 429 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/vcs.rs | 2 |
4 files changed, 431 insertions, 6 deletions
@@ -2,9 +2,5 @@ | |||
2 | # will have compiled files and executables | 2 | # will have compiled files and executables |
3 | /target/ | 3 | /target/ |
4 | 4 | ||
5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
7 | Cargo.lock | ||
8 | |||
9 | # These are backup files generated by rustfmt | 5 | # These are backup files generated by rustfmt |
10 | **/*.rs.bk | 6 | **/*.rs.bk |
diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..f722d18 --- /dev/null +++ b/Cargo.lock | |||
@@ -0,0 +1,429 @@ | |||
1 | # This file is automatically @generated by Cargo. | ||
2 | # It is not intended for manual editing. | ||
3 | [[package]] | ||
4 | name = "ansi_term" | ||
5 | version = "0.11.0" | ||
6 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
7 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" | ||
8 | dependencies = [ | ||
9 | "winapi", | ||
10 | ] | ||
11 | |||
12 | [[package]] | ||
13 | name = "approx" | ||
14 | version = "0.1.1" | ||
15 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
16 | checksum = "08abcc3b4e9339e33a3d0a5ed15d84a687350c05689d825e0f6655eef9e76a94" | ||
17 | |||
18 | [[package]] | ||
19 | name = "atty" | ||
20 | version = "0.2.14" | ||
21 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
22 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" | ||
23 | dependencies = [ | ||
24 | "hermit-abi", | ||
25 | "libc", | ||
26 | "winapi", | ||
27 | ] | ||
28 | |||
29 | [[package]] | ||
30 | name = "autocfg" | ||
31 | version = "1.0.0" | ||
32 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
33 | checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" | ||
34 | |||
35 | [[package]] | ||
36 | name = "bitflags" | ||
37 | version = "1.2.1" | ||
38 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
39 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | ||
40 | |||
41 | [[package]] | ||
42 | name = "bytemuck" | ||
43 | version = "1.3.1" | ||
44 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
45 | checksum = "db7a1029718df60331e557c9e83a55523c955e5dd2a7bfeffad6bbd50b538ae9" | ||
46 | |||
47 | [[package]] | ||
48 | name = "cc" | ||
49 | version = "1.0.58" | ||
50 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
51 | checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" | ||
52 | |||
53 | [[package]] | ||
54 | name = "cfg-if" | ||
55 | version = "0.1.10" | ||
56 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
57 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | ||
58 | |||
59 | [[package]] | ||
60 | name = "cgmath" | ||
61 | version = "0.16.1" | ||
62 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
63 | checksum = "64a4b57c8f4e3a2e9ac07e0f6abc9c24b6fc9e1b54c3478cfb598f3d0023e51c" | ||
64 | dependencies = [ | ||
65 | "approx", | ||
66 | "num-traits 0.1.43", | ||
67 | "rand", | ||
68 | ] | ||
69 | |||
70 | [[package]] | ||
71 | name = "clap" | ||
72 | version = "2.33.3" | ||
73 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
74 | checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" | ||
75 | dependencies = [ | ||
76 | "ansi_term", | ||
77 | "atty", | ||
78 | "bitflags", | ||
79 | "strsim", | ||
80 | "textwrap", | ||
81 | "unicode-width", | ||
82 | "vec_map", | ||
83 | ] | ||
84 | |||
85 | [[package]] | ||
86 | name = "colored" | ||
87 | version = "1.8.0" | ||
88 | dependencies = [ | ||
89 | "lazy_static", | ||
90 | "winconsole", | ||
91 | ] | ||
92 | |||
93 | [[package]] | ||
94 | name = "curl-sys" | ||
95 | version = "0.4.34+curl-7.71.1" | ||
96 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
97 | checksum = "ad4eff0be6985b7e709f64b5a541f700e9ad1407190a29f4884319eb663ed1d6" | ||
98 | dependencies = [ | ||
99 | "cc", | ||
100 | "libc", | ||
101 | "libz-sys", | ||
102 | "openssl-sys", | ||
103 | "pkg-config", | ||
104 | "vcpkg", | ||
105 | "winapi", | ||
106 | ] | ||
107 | |||
108 | [[package]] | ||
109 | name = "fuchsia-cprng" | ||
110 | version = "0.1.1" | ||
111 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
112 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" | ||
113 | |||
114 | [[package]] | ||
115 | name = "git2" | ||
116 | version = "0.8.0" | ||
117 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
118 | checksum = "c7339329bfa14a00223244311560d11f8f489b453fb90092af97f267a6090ab0" | ||
119 | dependencies = [ | ||
120 | "bitflags", | ||
121 | "libc", | ||
122 | "libgit2-sys", | ||
123 | "log", | ||
124 | "openssl-probe", | ||
125 | "openssl-sys", | ||
126 | "url", | ||
127 | ] | ||
128 | |||
129 | [[package]] | ||
130 | name = "hermit-abi" | ||
131 | version = "0.1.15" | ||
132 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
133 | checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" | ||
134 | dependencies = [ | ||
135 | "libc", | ||
136 | ] | ||
137 | |||
138 | [[package]] | ||
139 | name = "idna" | ||
140 | version = "0.1.5" | ||
141 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
142 | checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" | ||
143 | dependencies = [ | ||
144 | "matches", | ||
145 | "unicode-bidi", | ||
146 | "unicode-normalization", | ||
147 | ] | ||
148 | |||
149 | [[package]] | ||
150 | name = "lazy_static" | ||
151 | version = "1.4.0" | ||
152 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
153 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | ||
154 | |||
155 | [[package]] | ||
156 | name = "libc" | ||
157 | version = "0.2.74" | ||
158 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
159 | checksum = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" | ||
160 | |||
161 | [[package]] | ||
162 | name = "libgit2-sys" | ||
163 | version = "0.7.11" | ||
164 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
165 | checksum = "48441cb35dc255da8ae72825689a95368bf510659ae1ad55dc4aa88cb1789bf1" | ||
166 | dependencies = [ | ||
167 | "cc", | ||
168 | "curl-sys", | ||
169 | "libc", | ||
170 | "libssh2-sys", | ||
171 | "libz-sys", | ||
172 | "openssl-sys", | ||
173 | "pkg-config", | ||
174 | ] | ||
175 | |||
176 | [[package]] | ||
177 | name = "libssh2-sys" | ||
178 | version = "0.2.18" | ||
179 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
180 | checksum = "eafa907407504b0e683786d4aba47acf250f114d37357d56608333fd167dd0fc" | ||
181 | dependencies = [ | ||
182 | "cc", | ||
183 | "libc", | ||
184 | "libz-sys", | ||
185 | "openssl-sys", | ||
186 | "pkg-config", | ||
187 | "vcpkg", | ||
188 | ] | ||
189 | |||
190 | [[package]] | ||
191 | name = "libz-sys" | ||
192 | version = "1.0.27" | ||
193 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
194 | checksum = "6ca8894883d250240341478bf987467332fbdd5da5c42426c69a8f93dbc302f2" | ||
195 | dependencies = [ | ||
196 | "cc", | ||
197 | "libc", | ||
198 | "pkg-config", | ||
199 | "vcpkg", | ||
200 | ] | ||
201 | |||
202 | [[package]] | ||
203 | name = "log" | ||
204 | version = "0.4.11" | ||
205 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
206 | checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" | ||
207 | dependencies = [ | ||
208 | "cfg-if", | ||
209 | ] | ||
210 | |||
211 | [[package]] | ||
212 | name = "matches" | ||
213 | version = "0.1.8" | ||
214 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
215 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" | ||
216 | |||
217 | [[package]] | ||
218 | name = "num-traits" | ||
219 | version = "0.1.43" | ||
220 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
221 | checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" | ||
222 | dependencies = [ | ||
223 | "num-traits 0.2.12", | ||
224 | ] | ||
225 | |||
226 | [[package]] | ||
227 | name = "num-traits" | ||
228 | version = "0.2.12" | ||
229 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
230 | checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" | ||
231 | dependencies = [ | ||
232 | "autocfg", | ||
233 | ] | ||
234 | |||
235 | [[package]] | ||
236 | name = "openssl-probe" | ||
237 | version = "0.1.2" | ||
238 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
239 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" | ||
240 | |||
241 | [[package]] | ||
242 | name = "openssl-sys" | ||
243 | version = "0.9.58" | ||
244 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
245 | checksum = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" | ||
246 | dependencies = [ | ||
247 | "autocfg", | ||
248 | "cc", | ||
249 | "libc", | ||
250 | "pkg-config", | ||
251 | "vcpkg", | ||
252 | ] | ||
253 | |||
254 | [[package]] | ||
255 | name = "percent-encoding" | ||
256 | version = "1.0.1" | ||
257 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
258 | checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" | ||
259 | |||
260 | [[package]] | ||
261 | name = "pista" | ||
262 | version = "0.1.3" | ||
263 | dependencies = [ | ||
264 | "clap", | ||
265 | "colored", | ||
266 | "git2", | ||
267 | "libc", | ||
268 | "tico", | ||
269 | ] | ||
270 | |||
271 | [[package]] | ||
272 | name = "pkg-config" | ||
273 | version = "0.3.18" | ||
274 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
275 | checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" | ||
276 | |||
277 | [[package]] | ||
278 | name = "rand" | ||
279 | version = "0.4.6" | ||
280 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
281 | checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" | ||
282 | dependencies = [ | ||
283 | "fuchsia-cprng", | ||
284 | "libc", | ||
285 | "rand_core 0.3.1", | ||
286 | "rdrand", | ||
287 | "winapi", | ||
288 | ] | ||
289 | |||
290 | [[package]] | ||
291 | name = "rand_core" | ||
292 | version = "0.3.1" | ||
293 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
294 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" | ||
295 | dependencies = [ | ||
296 | "rand_core 0.4.2", | ||
297 | ] | ||
298 | |||
299 | [[package]] | ||
300 | name = "rand_core" | ||
301 | version = "0.4.2" | ||
302 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
303 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" | ||
304 | |||
305 | [[package]] | ||
306 | name = "rdrand" | ||
307 | version = "0.4.0" | ||
308 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
309 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" | ||
310 | dependencies = [ | ||
311 | "rand_core 0.3.1", | ||
312 | ] | ||
313 | |||
314 | [[package]] | ||
315 | name = "rgb" | ||
316 | version = "0.8.24" | ||
317 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
318 | checksum = "7466cad0eb3303798229ffab23bb8f598d185c71f3dfa17cd751d440e375782a" | ||
319 | dependencies = [ | ||
320 | "bytemuck", | ||
321 | ] | ||
322 | |||
323 | [[package]] | ||
324 | name = "strsim" | ||
325 | version = "0.8.0" | ||
326 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
327 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" | ||
328 | |||
329 | [[package]] | ||
330 | name = "textwrap" | ||
331 | version = "0.11.0" | ||
332 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
333 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" | ||
334 | dependencies = [ | ||
335 | "unicode-width", | ||
336 | ] | ||
337 | |||
338 | [[package]] | ||
339 | name = "tico" | ||
340 | version = "1.0.0" | ||
341 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
342 | checksum = "b9d73fbfe0205d9c15fb2768ac13d5bba2c39909bf326f5b36818aade6739464" | ||
343 | |||
344 | [[package]] | ||
345 | name = "tinyvec" | ||
346 | version = "0.3.3" | ||
347 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
348 | checksum = "53953d2d3a5ad81d9f844a32f14ebb121f50b650cd59d0ee2a07cf13c617efed" | ||
349 | |||
350 | [[package]] | ||
351 | name = "unicode-bidi" | ||
352 | version = "0.3.4" | ||
353 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
354 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" | ||
355 | dependencies = [ | ||
356 | "matches", | ||
357 | ] | ||
358 | |||
359 | [[package]] | ||
360 | name = "unicode-normalization" | ||
361 | version = "0.1.13" | ||
362 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
363 | checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" | ||
364 | dependencies = [ | ||
365 | "tinyvec", | ||
366 | ] | ||
367 | |||
368 | [[package]] | ||
369 | name = "unicode-width" | ||
370 | version = "0.1.8" | ||
371 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
372 | checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" | ||
373 | |||
374 | [[package]] | ||
375 | name = "url" | ||
376 | version = "1.7.2" | ||
377 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
378 | checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" | ||
379 | dependencies = [ | ||
380 | "idna", | ||
381 | "matches", | ||
382 | "percent-encoding", | ||
383 | ] | ||
384 | |||
385 | [[package]] | ||
386 | name = "vcpkg" | ||
387 | version = "0.2.10" | ||
388 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
389 | checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" | ||
390 | |||
391 | [[package]] | ||
392 | name = "vec_map" | ||
393 | version = "0.8.2" | ||
394 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
395 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" | ||
396 | |||
397 | [[package]] | ||
398 | name = "winapi" | ||
399 | version = "0.3.9" | ||
400 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
401 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" | ||
402 | dependencies = [ | ||
403 | "winapi-i686-pc-windows-gnu", | ||
404 | "winapi-x86_64-pc-windows-gnu", | ||
405 | ] | ||
406 | |||
407 | [[package]] | ||
408 | name = "winapi-i686-pc-windows-gnu" | ||
409 | version = "0.4.0" | ||
410 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
411 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
412 | |||
413 | [[package]] | ||
414 | name = "winapi-x86_64-pc-windows-gnu" | ||
415 | version = "0.4.0" | ||
416 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
417 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | ||
418 | |||
419 | [[package]] | ||
420 | name = "winconsole" | ||
421 | version = "0.10.0" | ||
422 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
423 | checksum = "3ef84b96d10db72dd980056666d7f1e7663ce93d82fa33b63e71c966f4cf5032" | ||
424 | dependencies = [ | ||
425 | "cgmath", | ||
426 | "lazy_static", | ||
427 | "rgb", | ||
428 | "winapi", | ||
429 | ] | ||
@@ -1,6 +1,6 @@ | |||
1 | [package] | 1 | [package] |
2 | name = "pista" | 2 | name = "pista" |
3 | version = "0.1.2" | 3 | version = "0.1.3" |
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" |
@@ -36,7 +36,7 @@ pub fn vcs_status() -> Option<(colored::ColoredString, colored::ColoredString)> | |||
36 | Ok(r) => r, | 36 | Ok(r) => r, |
37 | Err(_) => return None | 37 | Err(_) => return None |
38 | }; | 38 | }; |
39 | let mut branch; | 39 | let branch; |
40 | 40 | ||
41 | let branch_color = env::var("BRANCH_COLOR").unwrap_or("bright black".into()); | 41 | let branch_color = env::var("BRANCH_COLOR").unwrap_or("bright black".into()); |
42 | let commit_color = env::var("COMMIT_COLOR").unwrap_or("bright black".into()); | 42 | let commit_color = env::var("COMMIT_COLOR").unwrap_or("bright black".into()); |