diff options
author | Maximilian Bosch <[email protected]> | 2021-12-26 14:22:57 +0000 |
---|---|---|
committer | Maximilian Bosch <[email protected]> | 2021-12-30 17:06:49 +0000 |
commit | 4fd3ec330a89e4177099c21277d3c12e97ca0c21 (patch) | |
tree | a7cf2cb469b8d7b1285910af61472b1ea2bd05a8 | |
parent | cb3e69df8b17ffc0cab721e2dcc285731a1c5bc9 (diff) |
Update rustyline to v9
Also refresh line always. This isn't a big deal for the small
expressions we have here and also fixes a few annoying issues
I had with the highlighter.
-rw-r--r-- | Cargo.lock | 248 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/readline.rs | 7 |
3 files changed, 222 insertions, 35 deletions
@@ -1,5 +1,7 @@ | |||
1 | # This file is automatically @generated by Cargo. | 1 | # This file is automatically @generated by Cargo. |
2 | # It is not intended for manual editing. | 2 | # It is not intended for manual editing. |
3 | version = 3 | ||
4 | |||
3 | [[package]] | 5 | [[package]] |
4 | name = "aho-corasick" | 6 | name = "aho-corasick" |
5 | version = "0.7.10" | 7 | version = "0.7.10" |
@@ -55,9 +57,9 @@ checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" | |||
55 | 57 | ||
56 | [[package]] | 58 | [[package]] |
57 | name = "bitflags" | 59 | name = "bitflags" |
58 | version = "1.2.1" | 60 | version = "1.3.2" |
59 | source = "registry+https://github.com/rust-lang/crates.io-index" | 61 | source = "registry+https://github.com/rust-lang/crates.io-index" |
60 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | 62 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" |
61 | 63 | ||
62 | [[package]] | 64 | [[package]] |
63 | name = "blake2b_simd" | 65 | name = "blake2b_simd" |
@@ -83,6 +85,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
83 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | 85 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" |
84 | 86 | ||
85 | [[package]] | 87 | [[package]] |
88 | name = "cfg-if" | ||
89 | version = "1.0.0" | ||
90 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
91 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" | ||
92 | |||
93 | [[package]] | ||
86 | name = "clap" | 94 | name = "clap" |
87 | version = "2.33.0" | 95 | version = "2.33.0" |
88 | source = "registry+https://github.com/rust-lang/crates.io-index" | 96 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -98,6 +106,17 @@ dependencies = [ | |||
98 | ] | 106 | ] |
99 | 107 | ||
100 | [[package]] | 108 | [[package]] |
109 | name = "clipboard-win" | ||
110 | version = "4.2.2" | ||
111 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
112 | checksum = "3db8340083d28acb43451166543b98c838299b7e0863621be53a338adceea0ed" | ||
113 | dependencies = [ | ||
114 | "error-code", | ||
115 | "str-buf", | ||
116 | "winapi", | ||
117 | ] | ||
118 | |||
119 | [[package]] | ||
101 | name = "constant_time_eq" | 120 | name = "constant_time_eq" |
102 | version = "0.1.5" | 121 | version = "0.1.5" |
103 | source = "registry+https://github.com/rust-lang/crates.io-index" | 122 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -110,7 +129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
110 | checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" | 129 | checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" |
111 | dependencies = [ | 130 | dependencies = [ |
112 | "autocfg", | 131 | "autocfg", |
113 | "cfg-if", | 132 | "cfg-if 0.1.10", |
114 | "lazy_static", | 133 | "lazy_static", |
115 | ] | 134 | ] |
116 | 135 | ||
@@ -120,19 +139,18 @@ version = "2.0.2" | |||
120 | source = "registry+https://github.com/rust-lang/crates.io-index" | 139 | source = "registry+https://github.com/rust-lang/crates.io-index" |
121 | checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" | 140 | checksum = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" |
122 | dependencies = [ | 141 | dependencies = [ |
123 | "cfg-if", | 142 | "cfg-if 0.1.10", |
124 | "dirs-sys", | 143 | "dirs-sys", |
125 | ] | 144 | ] |
126 | 145 | ||
127 | [[package]] | 146 | [[package]] |
128 | name = "dirs" | 147 | name = "dirs-next" |
129 | version = "1.0.5" | 148 | version = "2.0.0" |
130 | source = "registry+https://github.com/rust-lang/crates.io-index" | 149 | source = "registry+https://github.com/rust-lang/crates.io-index" |
131 | checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" | 150 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" |
132 | dependencies = [ | 151 | dependencies = [ |
133 | "libc", | 152 | "cfg-if 1.0.0", |
134 | "redox_users", | 153 | "dirs-sys-next", |
135 | "winapi", | ||
136 | ] | 154 | ] |
137 | 155 | ||
138 | [[package]] | 156 | [[package]] |
@@ -141,13 +159,40 @@ version = "0.3.4" | |||
141 | source = "registry+https://github.com/rust-lang/crates.io-index" | 159 | source = "registry+https://github.com/rust-lang/crates.io-index" |
142 | checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" | 160 | checksum = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" |
143 | dependencies = [ | 161 | dependencies = [ |
144 | "cfg-if", | 162 | "cfg-if 0.1.10", |
163 | "libc", | ||
164 | "redox_users 0.3.4", | ||
165 | "winapi", | ||
166 | ] | ||
167 | |||
168 | [[package]] | ||
169 | name = "dirs-sys-next" | ||
170 | version = "0.1.2" | ||
171 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
172 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" | ||
173 | dependencies = [ | ||
145 | "libc", | 174 | "libc", |
146 | "redox_users", | 175 | "redox_users 0.4.0", |
147 | "winapi", | 176 | "winapi", |
148 | ] | 177 | ] |
149 | 178 | ||
150 | [[package]] | 179 | [[package]] |
180 | name = "endian-type" | ||
181 | version = "0.1.2" | ||
182 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
183 | checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" | ||
184 | |||
185 | [[package]] | ||
186 | name = "error-code" | ||
187 | version = "2.3.0" | ||
188 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
189 | checksum = "b5115567ac25674e0043e472be13d14e537f37ea8aa4bdc4aef0c89add1db1ff" | ||
190 | dependencies = [ | ||
191 | "libc", | ||
192 | "str-buf", | ||
193 | ] | ||
194 | |||
195 | [[package]] | ||
151 | name = "eva" | 196 | name = "eva" |
152 | version = "0.2.7" | 197 | version = "0.2.7" |
153 | dependencies = [ | 198 | dependencies = [ |
@@ -162,14 +207,36 @@ dependencies = [ | |||
162 | ] | 207 | ] |
163 | 208 | ||
164 | [[package]] | 209 | [[package]] |
210 | name = "fd-lock" | ||
211 | version = "3.0.2" | ||
212 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
213 | checksum = "a16910e685088843d53132b04e0f10a571fdb193224fc589685b3ba1ce4cb03d" | ||
214 | dependencies = [ | ||
215 | "cfg-if 1.0.0", | ||
216 | "libc", | ||
217 | "windows-sys", | ||
218 | ] | ||
219 | |||
220 | [[package]] | ||
165 | name = "getrandom" | 221 | name = "getrandom" |
166 | version = "0.1.14" | 222 | version = "0.1.14" |
167 | source = "registry+https://github.com/rust-lang/crates.io-index" | 223 | source = "registry+https://github.com/rust-lang/crates.io-index" |
168 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" | 224 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" |
169 | dependencies = [ | 225 | dependencies = [ |
170 | "cfg-if", | 226 | "cfg-if 0.1.10", |
227 | "libc", | ||
228 | "wasi 0.9.0+wasi-snapshot-preview1", | ||
229 | ] | ||
230 | |||
231 | [[package]] | ||
232 | name = "getrandom" | ||
233 | version = "0.2.3" | ||
234 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
235 | checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" | ||
236 | dependencies = [ | ||
237 | "cfg-if 1.0.0", | ||
171 | "libc", | 238 | "libc", |
172 | "wasi", | 239 | "wasi 0.10.2+wasi-snapshot-preview1", |
173 | ] | 240 | ] |
174 | 241 | ||
175 | [[package]] | 242 | [[package]] |
@@ -189,9 +256,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | |||
189 | 256 | ||
190 | [[package]] | 257 | [[package]] |
191 | name = "libc" | 258 | name = "libc" |
192 | version = "0.2.68" | 259 | version = "0.2.112" |
193 | source = "registry+https://github.com/rust-lang/crates.io-index" | 260 | source = "registry+https://github.com/rust-lang/crates.io-index" |
194 | checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" | 261 | checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" |
195 | 262 | ||
196 | [[package]] | 263 | [[package]] |
197 | name = "log" | 264 | name = "log" |
@@ -199,7 +266,7 @@ version = "0.4.8" | |||
199 | source = "registry+https://github.com/rust-lang/crates.io-index" | 266 | source = "registry+https://github.com/rust-lang/crates.io-index" |
200 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" | 267 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" |
201 | dependencies = [ | 268 | dependencies = [ |
202 | "cfg-if", | 269 | "cfg-if 0.1.10", |
203 | ] | 270 | ] |
204 | 271 | ||
205 | [[package]] | 272 | [[package]] |
@@ -209,16 +276,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
209 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" | 276 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" |
210 | 277 | ||
211 | [[package]] | 278 | [[package]] |
279 | name = "memoffset" | ||
280 | version = "0.6.5" | ||
281 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
282 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" | ||
283 | dependencies = [ | ||
284 | "autocfg", | ||
285 | ] | ||
286 | |||
287 | [[package]] | ||
288 | name = "nibble_vec" | ||
289 | version = "0.1.0" | ||
290 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
291 | checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" | ||
292 | dependencies = [ | ||
293 | "smallvec", | ||
294 | ] | ||
295 | |||
296 | [[package]] | ||
212 | name = "nix" | 297 | name = "nix" |
213 | version = "0.13.1" | 298 | version = "0.23.1" |
214 | source = "registry+https://github.com/rust-lang/crates.io-index" | 299 | source = "registry+https://github.com/rust-lang/crates.io-index" |
215 | checksum = "4dbdc256eaac2e3bd236d93ad999d3479ef775c863dbda3068c4006a92eec51b" | 300 | checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" |
216 | dependencies = [ | 301 | dependencies = [ |
217 | "bitflags", | 302 | "bitflags", |
218 | "cc", | 303 | "cc", |
219 | "cfg-if", | 304 | "cfg-if 1.0.0", |
220 | "libc", | 305 | "libc", |
221 | "void", | 306 | "memoffset", |
222 | ] | 307 | ] |
223 | 308 | ||
224 | [[package]] | 309 | [[package]] |
@@ -305,23 +390,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
305 | checksum = "ce082a9940a7ace2ad4a8b7d0b1eac6aa378895f18be598230c5f2284ac05426" | 390 | checksum = "ce082a9940a7ace2ad4a8b7d0b1eac6aa378895f18be598230c5f2284ac05426" |
306 | 391 | ||
307 | [[package]] | 392 | [[package]] |
393 | name = "radix_trie" | ||
394 | version = "0.2.1" | ||
395 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
396 | checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" | ||
397 | dependencies = [ | ||
398 | "endian-type", | ||
399 | "nibble_vec", | ||
400 | ] | ||
401 | |||
402 | [[package]] | ||
308 | name = "redox_syscall" | 403 | name = "redox_syscall" |
309 | version = "0.1.56" | 404 | version = "0.1.56" |
310 | source = "registry+https://github.com/rust-lang/crates.io-index" | 405 | source = "registry+https://github.com/rust-lang/crates.io-index" |
311 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" | 406 | checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" |
312 | 407 | ||
313 | [[package]] | 408 | [[package]] |
409 | name = "redox_syscall" | ||
410 | version = "0.2.10" | ||
411 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
412 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" | ||
413 | dependencies = [ | ||
414 | "bitflags", | ||
415 | ] | ||
416 | |||
417 | [[package]] | ||
314 | name = "redox_users" | 418 | name = "redox_users" |
315 | version = "0.3.4" | 419 | version = "0.3.4" |
316 | source = "registry+https://github.com/rust-lang/crates.io-index" | 420 | source = "registry+https://github.com/rust-lang/crates.io-index" |
317 | checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" | 421 | checksum = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" |
318 | dependencies = [ | 422 | dependencies = [ |
319 | "getrandom", | 423 | "getrandom 0.1.14", |
320 | "redox_syscall", | 424 | "redox_syscall 0.1.56", |
321 | "rust-argon2", | 425 | "rust-argon2", |
322 | ] | 426 | ] |
323 | 427 | ||
324 | [[package]] | 428 | [[package]] |
429 | name = "redox_users" | ||
430 | version = "0.4.0" | ||
431 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
432 | checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" | ||
433 | dependencies = [ | ||
434 | "getrandom 0.2.3", | ||
435 | "redox_syscall 0.2.10", | ||
436 | ] | ||
437 | |||
438 | [[package]] | ||
325 | name = "regex" | 439 | name = "regex" |
326 | version = "1.3.6" | 440 | version = "1.3.6" |
327 | source = "registry+https://github.com/rust-lang/crates.io-index" | 441 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -353,15 +467,22 @@ dependencies = [ | |||
353 | 467 | ||
354 | [[package]] | 468 | [[package]] |
355 | name = "rustyline" | 469 | name = "rustyline" |
356 | version = "4.1.0" | 470 | version = "9.1.1" |
357 | source = "registry+https://github.com/rust-lang/crates.io-index" | 471 | source = "registry+https://github.com/rust-lang/crates.io-index" |
358 | checksum = "0f47ea1ceb347d2deae482d655dc8eef4bd82363d3329baffa3818bd76fea48b" | 472 | checksum = "6c38cfbd0a4d7df7aab7cf53732d5d43449d0300358fd15cd4e8c8468a956aca" |
359 | dependencies = [ | 473 | dependencies = [ |
360 | "dirs", | 474 | "bitflags", |
475 | "cfg-if 1.0.0", | ||
476 | "clipboard-win", | ||
477 | "dirs-next", | ||
478 | "fd-lock", | ||
361 | "libc", | 479 | "libc", |
362 | "log", | 480 | "log", |
363 | "memchr", | 481 | "memchr", |
364 | "nix", | 482 | "nix", |
483 | "radix_trie", | ||
484 | "scopeguard", | ||
485 | "smallvec", | ||
365 | "unicode-segmentation", | 486 | "unicode-segmentation", |
366 | "unicode-width", | 487 | "unicode-width", |
367 | "utf8parse", | 488 | "utf8parse", |
@@ -369,6 +490,24 @@ dependencies = [ | |||
369 | ] | 490 | ] |
370 | 491 | ||
371 | [[package]] | 492 | [[package]] |
493 | name = "scopeguard" | ||
494 | version = "1.1.0" | ||
495 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
496 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" | ||
497 | |||
498 | [[package]] | ||
499 | name = "smallvec" | ||
500 | version = "1.7.0" | ||
501 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
502 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" | ||
503 | |||
504 | [[package]] | ||
505 | name = "str-buf" | ||
506 | version = "1.0.5" | ||
507 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
508 | checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a" | ||
509 | |||
510 | [[package]] | ||
372 | name = "strsim" | 511 | name = "strsim" |
373 | version = "0.8.0" | 512 | version = "0.8.0" |
374 | source = "registry+https://github.com/rust-lang/crates.io-index" | 513 | source = "registry+https://github.com/rust-lang/crates.io-index" |
@@ -416,9 +555,9 @@ checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" | |||
416 | 555 | ||
417 | [[package]] | 556 | [[package]] |
418 | name = "utf8parse" | 557 | name = "utf8parse" |
419 | version = "0.1.1" | 558 | version = "0.2.0" |
420 | source = "registry+https://github.com/rust-lang/crates.io-index" | 559 | source = "registry+https://github.com/rust-lang/crates.io-index" |
421 | checksum = "8772a4ccbb4e89959023bc5b7cb8623a795caa7092d99f3aa9501b9484d4557d" | 560 | checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" |
422 | 561 | ||
423 | [[package]] | 562 | [[package]] |
424 | name = "vec_map" | 563 | name = "vec_map" |
@@ -427,16 +566,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
427 | checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" | 566 | checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" |
428 | 567 | ||
429 | [[package]] | 568 | [[package]] |
430 | name = "void" | 569 | name = "wasi" |
431 | version = "1.0.2" | 570 | version = "0.9.0+wasi-snapshot-preview1" |
432 | source = "registry+https://github.com/rust-lang/crates.io-index" | 571 | source = "registry+https://github.com/rust-lang/crates.io-index" |
433 | checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" | 572 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" |
434 | 573 | ||
435 | [[package]] | 574 | [[package]] |
436 | name = "wasi" | 575 | name = "wasi" |
437 | version = "0.9.0+wasi-snapshot-preview1" | 576 | version = "0.10.2+wasi-snapshot-preview1" |
438 | source = "registry+https://github.com/rust-lang/crates.io-index" | 577 | source = "registry+https://github.com/rust-lang/crates.io-index" |
439 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" | 578 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" |
440 | 579 | ||
441 | [[package]] | 580 | [[package]] |
442 | name = "winapi" | 581 | name = "winapi" |
@@ -459,3 +598,46 @@ name = "winapi-x86_64-pc-windows-gnu" | |||
459 | version = "0.4.0" | 598 | version = "0.4.0" |
460 | source = "registry+https://github.com/rust-lang/crates.io-index" | 599 | source = "registry+https://github.com/rust-lang/crates.io-index" |
461 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | 600 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" |
601 | |||
602 | [[package]] | ||
603 | name = "windows-sys" | ||
604 | version = "0.28.0" | ||
605 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
606 | checksum = "82ca39602d5cbfa692c4b67e3bcbb2751477355141c1ed434c94da4186836ff6" | ||
607 | dependencies = [ | ||
608 | "windows_aarch64_msvc", | ||
609 | "windows_i686_gnu", | ||
610 | "windows_i686_msvc", | ||
611 | "windows_x86_64_gnu", | ||
612 | "windows_x86_64_msvc", | ||
613 | ] | ||
614 | |||
615 | [[package]] | ||
616 | name = "windows_aarch64_msvc" | ||
617 | version = "0.28.0" | ||
618 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
619 | checksum = "52695a41e536859d5308cc613b4a022261a274390b25bd29dfff4bf08505f3c2" | ||
620 | |||
621 | [[package]] | ||
622 | name = "windows_i686_gnu" | ||
623 | version = "0.28.0" | ||
624 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
625 | checksum = "f54725ac23affef038fecb177de6c9bf065787c2f432f79e3c373da92f3e1d8a" | ||
626 | |||
627 | [[package]] | ||
628 | name = "windows_i686_msvc" | ||
629 | version = "0.28.0" | ||
630 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
631 | checksum = "51d5158a43cc43623c0729d1ad6647e62fa384a3d135fd15108d37c683461f64" | ||
632 | |||
633 | [[package]] | ||
634 | name = "windows_x86_64_gnu" | ||
635 | version = "0.28.0" | ||
636 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
637 | checksum = "bc31f409f565611535130cfe7ee8e6655d3fa99c1c61013981e491921b5ce954" | ||
638 | |||
639 | [[package]] | ||
640 | name = "windows_x86_64_msvc" | ||
641 | version = "0.28.0" | ||
642 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
643 | checksum = "3f2b8c7cbd3bfdddd9ab98769f9746a7fad1bca236554cd032b78d768bc0e89f" | ||
@@ -12,7 +12,7 @@ categories = ["command-line-interface", "science", "parser-implementations"] | |||
12 | license = "MIT" | 12 | license = "MIT" |
13 | 13 | ||
14 | [dependencies] | 14 | [dependencies] |
15 | rustyline = "4.1.0" | 15 | rustyline = "9.1.1" |
16 | clap = "2.32.0" | 16 | clap = "2.32.0" |
17 | radix_fmt = "1.0.0" | 17 | radix_fmt = "1.0.0" |
18 | lazy_static = "1.3.0" | 18 | lazy_static = "1.3.0" |
diff --git a/src/readline.rs b/src/readline.rs index 2939ee1..f59cd22 100644 --- a/src/readline.rs +++ b/src/readline.rs | |||
@@ -7,6 +7,7 @@ use rustyline::error::ReadlineError; | |||
7 | use rustyline::highlight::Highlighter; | 7 | use rustyline::highlight::Highlighter; |
8 | use rustyline::hint::{Hinter, HistoryHinter}; | 8 | use rustyline::hint::{Hinter, HistoryHinter}; |
9 | use rustyline::{Context, Editor, Helper}; | 9 | use rustyline::{Context, Editor, Helper}; |
10 | use rustyline::validate::Validator; | ||
10 | 11 | ||
11 | use directories::ProjectDirs; | 12 | use directories::ProjectDirs; |
12 | 13 | ||
@@ -75,6 +76,7 @@ impl Highlighter for LineHighlighter { | |||
75 | } | 76 | } |
76 | 77 | ||
77 | impl Highlighter for RLHelper { | 78 | impl Highlighter for RLHelper { |
79 | fn highlight_char(&self, _: &str, _: usize) -> bool { true } | ||
78 | fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> { | 80 | fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> { |
79 | self.highlighter.highlight_hint(hint) | 81 | self.highlighter.highlight_hint(hint) |
80 | } | 82 | } |
@@ -96,11 +98,14 @@ impl Completer for RLHelper { | |||
96 | } | 98 | } |
97 | 99 | ||
98 | impl Hinter for RLHelper { | 100 | impl Hinter for RLHelper { |
99 | fn hint(&self, line: &str, a: usize, b: &Context) -> Option<String> { | 101 | type Hint = String; |
102 | fn hint(&self, line: &str, a: usize, b: &Context) -> Option<Self::Hint> { | ||
100 | self.hinter.hint(line, a, b) | 103 | self.hinter.hint(line, a, b) |
101 | } | 104 | } |
102 | } | 105 | } |
103 | 106 | ||
107 | impl Validator for RLHelper {} | ||
108 | |||
104 | impl Helper for RLHelper {} | 109 | impl Helper for RLHelper {} |
105 | 110 | ||
106 | pub fn create_readline() -> Editor<RLHelper> { | 111 | pub fn create_readline() -> Editor<RLHelper> { |