commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
c53483c5bd17612cf39529003a9e9c21071745ee
Rene Leonhardt
2025-07-08T20:59:37
chore(deps): remove deprecated home::home_dir() (#127) * chore(deps): remove deprecated home::home_dir() * allow deprecated home_dir for now :/
diff --git a/Cargo.lock b/Cargo.lock index 7cfeb2e..2c21901 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,30 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f...
4
12
90
6eac2af39213079ff786dd60238a331351d90e03
Steven Allen
2025-04-12T00:56:17
Release 1.0.2 Update windows-sys to 0.59.
diff --git a/Cargo.lock b/Cargo.lock index f19909c..20fc91c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "term" -version = "1.0.1" +version = "1.0.2" dependencies = [ "home", "windows-sys 0.59.0", diff --git a/Cargo.toml b/Cargo.toml index 46a6fef..ed5c1ea 1006...
2
2
2
5bb0bdb5e14321f3b96b9da9c6704757624a0f54
Steven Allen
2024-12-14T17:32:11
Release 1.0.1 - Always search for terminfo files in ~/.terminfo, even when the TERMINFO and TERMINFO_DIRS environment variables are set.
diff --git a/Cargo.lock b/Cargo.lock index 618a19d..91ed4cd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "term" -version = "1.0.0" +version = "1.0.1" dependencies = [ "home", "windows-sys 0.52.0", diff --git a/Cargo.toml b/Cargo.toml index 2c5f65a..a1f66a5 1006...
2
2
2
88eedc9875f479b55a5c7604c685481beb7928bb
Steven Allen
2024-12-14T17:31:02
fix: always search ~/.terminfo for terminfo files (#122) Per the manual: 1. Search TERMINFO. 2. Search ~/.terminfo. 3. Search TERMINFO_DIRS. 4. Search /usr/share/terminfo and friends. Technically we're allowed to omit the search in ~/.terminfo entirely, but this would introduce surprising results and we should just ...
diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs index ab8909e..6a98916 100644 --- a/src/terminfo/searcher.rs +++ b/src/terminfo/searcher.rs @@ -16,61 +16,67 @@ use std::env; use std::fs; use std::path::PathBuf; +// The default terminfo location should be /usr/lib/terminfo but that's not guaranteed,...
1
37
31
cc85fa59343febf62fd9740a5031d28e4e38ef52
Steven Allen
2024-07-21T17:31:04
Release 1.0 (#120) This crate is defacto stable so we might as well move to 1.0.
diff --git a/Cargo.lock b/Cargo.lock index 9fc9fb6..618a19d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "term" -version = "0.7.0" +version = "1.0.0" dependencies = [ "home", "windows-sys 0.52.0", diff --git a/Cargo.toml b/Cargo.toml index 09dd7a9..2c5f65a 1006...
2
2
2
702eea454c4b222c587bc50b3825ef5e62c962b7
Steven Allen
2024-07-21T16:24:22
more clippy fixes (#119)
diff --git a/src/lib.rs b/src/lib.rs index ce70bf3..03e1c00 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,17 +32,15 @@ //! ```no_run //! use std::io::prelude::*; //! -//! fn main() { -//! let mut t = term::stdout().unwrap(); +//! let mut t = term::stdout().unwrap(); //! -//! t.fg(term::color::GREEN).unwra...
3
19
20
480a3730c1ec09e9125141d1b1f26601f5ae76e4
Steven Allen
2024-07-21T16:20:35
Drop pre-1.36 rust support (#118)
diff --git a/Cargo.lock b/Cargo.lock index de2a17c..9fc9fb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,18 +11,11 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "rustversion" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b...
3
0
25
3fa28d5c5bdf083e7c855362f1325cb54da2c6ce
Steven Allen
2024-07-21T15:39:40
Switch from the winapi crate to windows-sys (#115) fixes #114
diff --git a/Cargo.lock b/Cargo.lock index 4e2df8b..de2a17c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "windows-sys", + "wi...
3
108
46
7eb456953089f23229599e46a04a060d2c1ed662
Utkarsh Gupta
2023-04-25T20:52:14
Move to the smaller, cargo-team maintained `home` crate (#113)
diff --git a/Cargo.toml b/Cargo.toml index 2202cd8..04656a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ circle-ci = { repository = "Stebalien/term" } appveyor = { repository = "Stebalien/term" } [dependencies] -dirs-next = "2" +home = "0.5.4" [target.'cfg(windows)'.dependencies] winapi = { versio...
2
2
4
c0dd210e676476b8a4098a764c8c59f7f7f19c38
Smitty
2021-04-25T23:55:14
Build on Rust 1.53
diff --git a/src/terminfo/parm.rs b/src/terminfo/parm.rs index a7f0b50..8aa74af 100644 --- a/src/terminfo/parm.rs +++ b/src/terminfo/parm.rs @@ -675,15 +675,15 @@ mod test { for &(op, bs) in &v { let s = format!("%{{1}}%{{2}}%{}%d", op); let res = expand(s.as_bytes(), &[], &mut Variab...
1
6
6
bc8801fe0f9e0bbce3f09e311ad6a32230d8c34b
Smittyvb
2021-04-25T23:46:33
SPDX-formatted license
diff --git a/Cargo.toml b/Cargo.toml index cfe873e..2202cd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "term" version = "0.7.0" authors = ["The Rust Project Developers", "Steven Allen"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README.md" repository = "https://github...
1
1
1
da2258b512610a17b9c5a79758d231afda81af24
Steven Allen
2021-01-12T18:17:16
update deps
diff --git a/Cargo.toml b/Cargo.toml index 455c91c..fc7ef53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ dirs-next = "2" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["consoleapi", "wincon", "handleapi", "fileapi"] } -rustversion = "0.1" +rustversion = "1" [features] ...
1
1
1
df5cc51254a3a4c9de807304fab9b7a54e3e9f8a
Ossi Herrala
2020-11-13T13:02:05
Change unmaintained dirs crate to dirs-next Fixes https://rustsec.org/advisories/RUSTSEC-2020-0053 Crate: dirs Title: dirs is unmaintained, use dirs-next instead Date: 2020-10-16 URL: https://rustsec.org/advisories/RUSTSEC-2020-0053 Dependency tree: dirs 3.0.1 └── term 0.6.1
diff --git a/Cargo.toml b/Cargo.toml index b54a665..455c91c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ travis-ci = { repository = "Stebalien/term" } appveyor = { repository = "Stebalien/term" } [dependencies] -dirs = "3.0.1" +dirs-next = "2" [target.'cfg(windows)'.dependencies] winapi = { versio...
2
2
2
1e5991e65788088902e0903e8864007188848c1f
David Hotham
2020-08-02T10:27:49
bump dirs
diff --git a/Cargo.toml b/Cargo.toml index 0c55705..b54a665 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ travis-ci = { repository = "Stebalien/term" } appveyor = { repository = "Stebalien/term" } [dependencies] -dirs = "2.0.1" +dirs = "3.0.1" [target.'cfg(windows)'.dependencies] winapi = { version...
1
1
1
3e2f43418207c28987a8a90db1c7f2e051634225
David Hotham
2020-08-02T10:26:29
Update error handling `cause()` and `description()` are deprecated these days, replaced by `source()` and the `Display` impl.
diff --git a/src/lib.rs b/src/lib.rs index adee068..d23d873 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -253,32 +253,27 @@ pub type Result<T> = std::result::Result<T, Error>; impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - use std::error::Error; -...
3
39
60
65801a05fc26e6610ef3428a80f0df9270e450f3
rhysd
2019-08-22T04:46:32
Add test for get_console_screen_buffer_info()
diff --git a/src/win.rs b/src/win.rs index b22a2a1..48ece2d 100644 --- a/src/win.rs +++ b/src/win.rs @@ -182,6 +182,16 @@ unsafe fn get_console_screen_buffer_info(handle: HANDLE) -> io::Result<CONSOLE_S } } +// This test will only pass if it is running in an actual console, probably +#[test] +fn test_get_consol...
1
10
0
3e9624f5beb5805836e6c4c0de123bc20596f027
rhysd
2019-08-22T04:42:27
Call .assume_init() after CONSOLE_SCREEN_BUFFER_INFO is initialized
diff --git a/src/win.rs b/src/win.rs index f4a8fc1..b22a2a1 100644 --- a/src/win.rs +++ b/src/win.rs @@ -174,11 +174,11 @@ unsafe fn get_console_screen_buffer_info(handle: HANDLE) -> io::Result<CONSOLE_S } #[rustversion::since(1.36)] unsafe fn get_console_screen_buffer_info(handle: HANDLE) -> io::Result<CONSOLE_SCRE...
1
3
3
8edc0474dd4d27b0af055feefb583794dad4b3f2
rhysd
2019-08-21T23:36:12
Wrap GetConsoleScreenBufferInfo() instead of uninitialized() to avoid undefined behavior
diff --git a/src/win.rs b/src/win.rs index e71e601..f4a8fc1 100644 --- a/src/win.rs +++ b/src/win.rs @@ -27,7 +27,9 @@ use winapi::um::consoleapi::{GetConsoleMode, SetConsoleMode}; use winapi::um::fileapi::{CreateFileA, OPEN_EXISTING}; use winapi::um::handleapi::{CloseHandle, INVALID_HANDLE_VALUE}; use winapi::um::w...
1
45
48
53ed3765368efed0d026724e9d1b092ea6f0e519
rhysd
2019-08-21T11:28:08
Use mem::MaybeUninit instead of mem::uninitialized() since Rust 1.36
diff --git a/Cargo.toml b/Cargo.toml index b011922..0c55705 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,7 @@ dirs = "2.0.1" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["consoleapi", "wincon", "handleapi", "fileapi"] } +rustversion = "0.1" [features] default=[] diff --g...
2
14
4
873d3783a0d034a7c40b48e3ccd1b36f75351c1d
Linda_pp
2019-08-21T11:00:31
Avoid installing old version in documentation
diff --git a/src/lib.rs b/src/lib.rs index dd8dc96..adee068 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ //! ```toml //! [dependencies] //! -//! term = "0.4.6" +//! term = "*" //! ``` //! //! and this to your crate root:
1
1
1
61d944cfb767a00313497997878f9f2a35252b5c
Steven Allen
2019-08-05T18:33:15
release v0.6.1
diff --git a/Cargo.toml b/Cargo.toml index 65b5d15..b011922 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.6.0" +version = "0.6.1" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
faaa9a40ecb38b46dea79c2e8b26244d2a4223bd
Lukas Lueg
2019-08-05T18:19:43
Remove byteorder-dependency
diff --git a/Cargo.toml b/Cargo.toml index 04c6e10..65b5d15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ travis-ci = { repository = "Stebalien/term" } appveyor = { repository = "Stebalien/term" } [dependencies] -byteorder = "1.2.1" dirs = "2.0.1" [target.'cfg(windows)'.dependencies] diff --git a/s...
3
16
11
946602c2988a56c332c1872452c590fa67b89733
Steven Allen
2019-08-04T21:20:14
nit: disable field pun warning https://github.com/rust-lang/rust-clippy/issues/3422
diff --git a/src/lib.rs b/src/lib.rs index 2ab1dd7..dd8dc96 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -64,6 +64,7 @@ )] #![deny(missing_docs)] #![cfg_attr(test, deny(warnings))] +#![allow(clippy::redundant_field_names)] use std::io::prelude::*;
1
1
0
c09946b15899d3ad5b2b9ae5c356afe71a38398d
Steven Allen
2019-07-26T16:54:15
release v0.6.0
diff --git a/Cargo.toml b/Cargo.toml index 9ade284..04c6e10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.5.2" +version = "0.6.0" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
e779a32a0a0b9d7d956fa21e89e14d515d265e4d
Felix Kohlgrüber
2019-07-25T17:45:29
code review changes
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index ae3840a..a284a3d 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -113,8 +113,8 @@ impl TermInfo { Ok(TermInfo { names: vec![name.to_owned()], bools: HashMap::new(), - numbers, - ...
2
9
9
75cfed92926ccce38407915e2f1e5793528ad672
Felix Kohlgrüber
2019-07-25T16:06:48
fix windows errors
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 3c18ba7..ae3840a 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -19,7 +19,7 @@ use std::io::BufReader; use std::path::Path; #[cfg(windows)] -use win; +use crate::win; use self::parm::{expand, Param, Variables}; use self::parser::compile...
2
16
18
5b4a03e074c4551a80e2a02985768e0d3aac9443
Felix Kohlgrüber
2019-07-25T15:33:04
fix clippy warnings (default settings)
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index c1b67ea..c492016 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -34,7 +34,7 @@ use self::Error::*; /// Returns true if the named terminal supports basic ANSI escape codes. fn is_ansi(name: &str) -> bool { // SORTED! We binary search this...
4
16
16
47cb0930df1f872be5d273126a161aa469ca695a
Felix Kohlgrüber
2019-07-25T15:15:55
cargo fix edition idioms
diff --git a/src/lib.rs b/src/lib.rs index e99a822..f47d055 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,8 +65,8 @@ #![deny(missing_docs)] #![cfg_attr(test, deny(warnings))] -extern crate byteorder; -extern crate dirs; + + use std::io::prelude::*; @@ -254,7 +254,7 @@ impl std::cmp::PartialEq for Error { pu...
4
6
6
68f1ba8da21a81d5167053837673e0dc63c9a1a3
Felix Kohlgrüber
2019-07-25T15:11:25
update to edition 2018 (using cargo fix)
diff --git a/Cargo.toml b/Cargo.toml index 3d67328..9ade284 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ A terminal formatting library """ categories = ["command-line-interface"] exclude = ["/scripts/*", "/.travis.yml", "/appveyor.yml"] +edition = "2018" [badges] travis-ci = { repository = "Stebali...
5
25
24
dd4f9a63edb79558d9035bd15e8fced1d842594c
Felix Kohlgrüber
2019-07-25T14:49:41
fix compiler warnings
diff --git a/src/lib.rs b/src/lib.rs index 3e04b58..4b55dd8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,9 +82,9 @@ pub mod terminfo; mod win; /// Alias for stdout terminals. -pub type StdoutTerminal = Terminal<Output = Stdout> + Send; +pub type StdoutTerminal = dyn Terminal<Output = Stdout> + Send; /// Alias f...
4
16
16
a27c5079cd17104db148ddb836f1eb769a076c2a
soc
2019-06-16T02:52:45
Update dirs to 2.0.1
diff --git a/Cargo.toml b/Cargo.toml index e4830ab..3d67328 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ appveyor = { repository = "Stebalien/term" } [dependencies] byteorder = "1.2.1" -dirs = "1.0.2" +dirs = "2.0.1" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["con...
1
1
1
45ac5a1389fcebc071dd584d4677aa37b869f05e
Steven Allen
2019-03-28T18:57:06
release 0.5.2
diff --git a/Cargo.toml b/Cargo.toml index 556c9e4..e4830ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.5.1" +version = "0.5.2" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
67a1d78a8cacc1657137433c16ec31715407de90
Steven Allen
2019-01-09T20:30:25
separate conout_supports_ansi and conout And rename to `supports_ansi`.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 6fd78fc..9cfe40c 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -74,7 +74,7 @@ impl TermInfo { #[cfg(windows)] { - if term_name.is_none() && win::conout_supports_ansi() { + if term_name.is_none() && win...
2
28
38
b6ed361046fcefa31d1c217d996fd18890f7d7cd
Igor Gnatenko
2018-11-10T11:49:52
exclude CI files from crates.io
diff --git a/Cargo.toml b/Cargo.toml index f765a27..d1bea9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ description = """ A terminal formatting library """ categories = ["command-line-interface"] +exclude = ["/scripts/*", "/.travis.yml", "/appveyor.yml"] [badges] travis-ci = { repository = "Stebal...
1
1
0
f4400b104e65e0ff7b5747e9f771c6b3f02782d1
Mohammad AlSaleh
2018-11-03T00:07:53
Pretend to be xterm if Windows console supports ansi Windows people seem to be fine with this: https://github.com/Microsoft/WSL/issues/1446 I still think a precise terminfo file with the list of supported sequences documented in the below link would be ideal: https://docs.microsoft.com/en-us/windows/console/cons...
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index d9d17bc..6fd78fc 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -18,6 +18,10 @@ use std::io; use std::io::BufReader; use std::path::Path; + +#[cfg(windows)] +use win; + use Attr; use color; use Terminal; @@ -67,6 +71,17 @@ impl TermInfo ...
1
15
0
19303a75fce05450741d759fa9d094fbe401774f
Mohammad AlSaleh
2018-08-22T18:13:18
win: Add conout_supports_ansi() Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
diff --git a/Cargo.toml b/Cargo.toml index f765a27..0185ea0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ byteorder = "1.2.1" dirs = "1.0.2" [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["wincon", "handleapi", "fileapi"] } +winapi = { version = "0.3", features = ["consol...
2
31
4
be4b272787bd818bfaae2693a20fe0615a7076a6
Mohammad AlSaleh
2018-08-21T09:59:25
win: Emulate reverse, secure, and standout * As cmr's comment says, COMMON_LVB_REVERSE_VIDEO and COMMON_LVB_UNDERSCORE are not usable. There is a mode flag (ENABLE_LVB_GRID_WORLDWIDE) that is supposed to make them work, but: 1. COMMON_LVB_REVERSE_VIDEO works on Windows 10 regardless of whether this f...
diff --git a/src/win.rs b/src/win.rs index 36a8a6b..71c8278 100644 --- a/src/win.rs +++ b/src/win.rs @@ -24,7 +24,7 @@ use Result; use Terminal; use color; -use win::winapi::um::wincon::{SetConsoleCursorPosition, SetConsoleTextAttribute}; +use win::winapi::um::wincon::{SetConsoleCursorPosition, SetConsoleTextAttrib...
1
51
6
432cf481fec727b7b3d29a3c86b56c747780bd7c
Mohammad AlSaleh
2018-08-20T17:46:00
Use WinConsoleInfo as a field in WinConsole Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
diff --git a/src/win.rs b/src/win.rs index 6c94e66..36a8a6b 100644 --- a/src/win.rs +++ b/src/win.rs @@ -45,10 +45,7 @@ pub struct WinConsoleInfo { /// A Terminal implementation which uses the Win32 Console API. pub struct WinConsole<T> { buf: T, - def_foreground: color::Color, - def_background: color::Col...
1
13
19
baccbb672a7fb1f0723e25f3362a20426cf4ed54
Mohammad AlSaleh
2018-08-20T13:09:45
win: Add WinConsoleInfo struct Parallel API to terminfo terminals is also added: * WinConsoleInfo::from_env() * WinConsole::new_with_consoleinfo() Just like terminfo, this allows to check if we are going to get errors before moving `out`. Related: #57 Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gma...
diff --git a/src/lib.rs b/src/lib.rs index f28699d..3e04b58 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -72,7 +72,7 @@ use std::io::prelude::*; pub use terminfo::TerminfoTerminal; #[cfg(windows)] -pub use win::WinConsole; +pub use win::{WinConsole, WinConsoleInfo}; use std::io::{self, Stderr, Stdout}; diff --g...
2
47
18
8c41c5482bd99d61db2dcd835d3283ad870209b8
Scott Wolchok
2018-07-27T22:33:00
don't leak memory on Windows Fixes #63.
diff --git a/src/win.rs b/src/win.rs index 81426fc..72e7ca2 100644 --- a/src/win.rs +++ b/src/win.rs @@ -16,6 +16,7 @@ extern crate winapi; use std::io::prelude::*; use std::io; +use std::ops::Deref; use std::ptr; use Attr; use Error; @@ -27,7 +28,7 @@ use win::winapi::um::wincon::{SetConsoleCursorPosition, SetC...
1
40
12
84cfdb51775b327fedf21784749d862fdffa10b4
Steven Allen
2018-07-27T23:30:29
fix warning due to use of env::home_dir
diff --git a/Cargo.toml b/Cargo.toml index a8a2e15..f765a27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ appveyor = { repository = "Stebalien/term" } [dependencies] byteorder = "1.2.1" +dirs = "1.0.2" [target.'cfg(windows)'.dependencies] winapi = { version = "0.3", features = ["wincon", "handleapi...
3
11
4
c01b2a7fbf2a9e1854ce02f5721c2a03364f1221
Steven Allen
2018-02-23T17:27:00
release 0.5.1 Emergency release to fix build issue on windows. (NTS: This is why CI exists, dummy. Use it!)
diff --git a/Cargo.toml b/Cargo.toml index 13f05a3..a8a2e15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.5.0" +version = "0.5.1" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
30a17f6057c067b7e20b12630641ad182b937daa
Steven Allen
2018-02-23T16:51:02
fix compile on windows We now use 32bit colors.
diff --git a/src/win.rs b/src/win.rs index 218a48d..81426fc 100644 --- a/src/win.rs +++ b/src/win.rs @@ -75,7 +75,7 @@ fn bits_to_color(bits: u16) -> color::Color { _ => unreachable!(), }; - color | (bits & 0x8) // copy the hi-intensity bit + color | (bits as u32 & 0x8) // copy the hi-intensity bi...
1
1
1
cb19b9fac0ace9e577aa9183a9d7f4e1e169dc5b
Steven Allen
2018-02-23T06:05:11
modernize rust code * rustfmt * try -> questionmark
diff --git a/src/lib.rs b/src/lib.rs index 91bceff..d8c1e7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,8 +58,7 @@ #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://doc.rust-lang.org/favicon.ico", - html_root_url = "https://stebalien....
7
368
356
65712fc695103606f4e738d8e68a4b6960f3ab6c
Steven Allen
2018-02-23T05:40:12
release 0.5.0 Fix for new ncurses release. Unfortunately, this is a breaking change as we needed to change the number type.
diff --git a/Cargo.toml b/Cargo.toml index c2162dc..13f05a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.7" +version = "0.5.0" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
777d879b66c5c75795de1e9e0a705d7f3543de28
Bastien Orivel
2018-01-03T11:58:16
Update winapi to 0.3 and bump version
diff --git a/Cargo.toml b/Cargo.toml index 240e587..8f5af78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.6" +version = "0.4.7" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md" @@ -18,8 +18,7 @@ travis-ci ...
2
33
28
4746841ea16fee3f857f2d90b97de865b91a4fcb
Richard Dodd
2017-10-16T21:20:24
Fix bug in windows delete_line Currently the delete_line function will fill the row with '\0', which causes bugs. Using space ' ' fixes those bugs.
diff --git a/src/win.rs b/src/win.rs index 3d571d5..a3a3af3 100644 --- a/src/win.rs +++ b/src/win.rs @@ -246,7 +246,8 @@ impl<T: Write + Send> Terminal for WinConsole<T> { let size = buffer_info.dwSize; let num = (size.X - pos.X) as winapi::DWORD; let mut written = 0; - ...
1
2
1
575415caf72ccc028110a3a294b8058247a35152
Martin Geisler
2017-07-25T20:46:37
Add CI badges for crates.io
diff --git a/Cargo.toml b/Cargo.toml index 832e129..240e587 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,10 @@ A terminal formatting library """ categories = ["command-line-interface"] +[badges] +travis-ci = { repository = "Stebalien/term" } +appveyor = { repository = "Stebalien/term" } + [target.'cfg(win...
1
4
0
4ae8f825d79d47a2b681e7fabc7a73a6798b8eae
Steven Allen
2017-06-23T17:45:41
Release 0.4.6
diff --git a/Cargo.toml b/Cargo.toml index afd3a00..832e129 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.5" +version = "0.4.6" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md" diff --git a/src/lib.rs b/sr...
2
2
2
653e2b10c4261e4aa94e28af136d174dd9c262e9
Sarah Mount
2017-05-31T11:22:55
Documented version number matches crates.io.
diff --git a/src/lib.rs b/src/lib.rs index fd02172..2b0a246 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ //! ```toml //! [dependencies] //! -//! term = "0.2" +//! term = "0.4.5" //! ``` //! //! and this to your crate root:
1
1
1
39d28c4e6e8534ba62097aafae0a6e9f0297ecba
Steven Allen
2017-02-13T20:46:40
Fallback on basic ANSI terminal support. Fixes #44
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 7c10f7b..71cdd64 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -23,11 +23,36 @@ use color; use Terminal; use Result; use self::searcher::get_dbpath_for_term; -use self::parser::compiled::{parse, msys_terminfo}; +use self::parser::compiled::...
3
76
32
203e4d59f33b9bf24c5412c044d3e61e26e4fa0c
Steven Allen
2017-02-07T17:55:50
release 0.4.5
diff --git a/Cargo.toml b/Cargo.toml index aebc233..afd3a00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.4" +version = "0.4.5" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
5c9b2c473d30591e1a440d7a8aca157e46143c1b
Steven Allen
2017-02-07T17:51:45
Remove extraneous match keyword.
diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs index e01bcb0..1782118 100644 --- a/src/terminfo/searcher.rs +++ b/src/terminfo/searcher.rs @@ -42,7 +42,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> { dirs_to_search.push(PathBuf::from(dir)); } - if let Ok(dirs) = mat...
1
1
1
5e9f2a49c25c5b895646514b3f24679d534b272c
Steven Allen
2017-02-07T17:19:31
Document why we don't stop at TERMINFO The ncurses and terminfo manuals differ.
diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs index 29f5274..e01bcb0 100644 --- a/src/terminfo/searcher.rs +++ b/src/terminfo/searcher.rs @@ -25,6 +25,19 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> { }; // Find search directory + // The terminfo manual says: + // +...
1
13
0
dfd53dbafaaa85afd9ce06e22a7be4159eead085
Steven Allen
2017-01-26T01:12:56
Use "el" instead of "crl_eol" We use the shortnames (for now).
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index f3777db..4a0c663 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -280,7 +280,7 @@ impl<T: Write + Send> Terminal for TerminfoTerminal<T> { } fn delete_line(&mut self) -> Result<()> { - self.ti.apply_cap("clr_eol", &[], &mut se...
1
1
1
1f898e80dcb421b92b990da2c2ecc251fa2cfcb7
Jake Goulding
2017-01-20T16:20:31
Add categories to Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index 7ada59b..aebc233 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ documentation = "https://stebalien.github.io/doc/term/term/" description = """ A terminal formatting library """ +categories = ["command-line-interface"] [target.'cfg(windows)'.dependencies] win...
1
1
0
ba25e6b217ffc9566a97e57a7d969ffc82ea3792
Martin Pool
2016-12-21T15:57:02
Documented function of `delete_line` is more like `clr_eol` Fixes https://github.com/Stebalien/term/issues/67.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 4a611ec..f3777db 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -280,7 +280,7 @@ impl<T: Write + Send> Terminal for TerminfoTerminal<T> { } fn delete_line(&mut self) -> Result<()> { - self.ti.apply_cap("dl", &[], &mut self.ou...
1
1
1
67ccce09fec9b7253a99d57c94f06cd2198f49f2
meh
2016-10-29T20:27:42
Fix terminfo database search path
diff --git a/src/terminfo/searcher.rs b/src/terminfo/searcher.rs index ccd152c..29f5274 100644 --- a/src/terminfo/searcher.rs +++ b/src/terminfo/searcher.rs @@ -25,36 +25,34 @@ pub fn get_dbpath_for_term(term: &str) -> Option<PathBuf> { }; // Find search directory - match env::var_os("TERMINFO") { - ...
1
26
28
22f5e1865a62e97ad0ad59174cd28c9aa2fa89a7
Hanno Braun
2016-10-24T13:10:21
Remove `Send` bound As far as I can tell, the `Send` bound doesn't serve any purpose and removing it didn't seem to have any adverse effects.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 4a611ec..0175038 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -227,7 +227,7 @@ pub struct TerminfoTerminal<T> { ti: TermInfo, } -impl<T: Write + Send> Terminal for TerminfoTerminal<T> { +impl<T: Write> Terminal for TerminfoTerminal<T>...
1
2
2
1581d6a725daeffbfbdf2b72bb7abafe1bfda9c2
Steven Allen
2016-05-11T18:48:05
Fix clippy warnings
diff --git a/Cargo.toml b/Cargo.toml index 68992bf..7ada59b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,5 @@ A terminal formatting library winapi = "0.2" kernel32-sys = "0.2" -[dependencies.clippy] -version = "0" -optional = true - [features] default=[] diff --git a/src/lib.rs b/src/lib.rs index 68bee6f...
5
53
79
305f1bde19a66bd2d450ecedda18906f159fc334
Steven Allen
2016-02-18T00:43:30
Use static `&str`s for capability names.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 511b7cd..dde9cff 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -34,11 +34,11 @@ pub struct TermInfo { /// Names for the terminal pub names: Vec<String>, /// Map of capability name to boolean value - pub bools: HashMap<String,...
2
15
15
268e3a8b6a400411bad89ad3830106991bf1d976
David Hotham
2016-05-10T10:04:46
Fix build failure on nightly
diff --git a/src/lib.rs b/src/lib.rs index a07633e..68bee6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,7 +274,6 @@ impl std::fmt::Display for Error { impl std::error::Error for Error { fn description(&self) -> &str { use Error::*; - use std::error::Error; match *self { ...
1
0
1
4e6af7abe43f3e63f1b74c9317c3e658d79b4c1e
David Hotham
2016-05-10T09:57:55
Only depend on Windows libraries when necessary
diff --git a/Cargo.toml b/Cargo.toml index 46ec8f0..68992bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ description = """ A terminal formatting library """ -[dependencies] +[target.'cfg(windows)'.dependencies] winapi = "0.2" kernel32-sys = "0.2"
1
1
1
91982179448a959a45324ad467cd1ff6c5bd2d2e
Corey Richardson
2016-03-14T19:25:00
Factor out reset and apply_cap into TermInfo These helpers are very useful for other consumers of TermInfo besides just our own proprietary TerminfoTermainal. In particular, I wanted these a lot when adding terminfo support to the new colored crate.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index c2cb0d1..511b7cd 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -79,6 +79,45 @@ impl TermInfo { let mut reader = BufReader::new(file); parse(&mut reader, false) } + + /// Retrieve a capability `cmd` and expand it with ...
1
46
39
14c8a93deff0ae53cc71fb301273356667d1258a
Steven Allen
2016-02-11T21:20:30
Fix clippy dep version
diff --git a/Cargo.toml b/Cargo.toml index 51eb422..46ec8f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ winapi = "0.2" kernel32-sys = "0.2" [dependencies.clippy] -version = "*" +version = "0" optional = true [features]
1
1
1
cd96a29cad06fc3c9e09797e722267ce7b00e569
Steven Allen
2016-02-11T19:59:38
Derive all the things.
diff --git a/src/lib.rs b/src/lib.rs index 65412bc..a07633e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -147,7 +147,7 @@ pub mod color { /// Most attributes can only be turned on and must be turned off with term.reset(). /// The ones that can be turned off explicitly take a boolean value. /// Color is also represent...
2
3
2
ef2ce4020cfa054ec9b18d7884d799c9d4df962e
Steven Allen
2016-02-05T17:46:05
Clippy (almost) all the things
diff --git a/Cargo.toml b/Cargo.toml index b4b376c..51eb422 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,10 @@ A terminal formatting library [dependencies] winapi = "0.2" kernel32-sys = "0.2" + +[dependencies.clippy] +version = "*" +optional = true + +[features] +default=[] diff --git a/src/lib.rs b/src/lib...
5
107
97
7bbf005978fb3a88e5b339d9fd300fe672c8fc84
Steven Allen
2016-02-01T17:25:58
Release 0.4.4 Because there was a cargo bug, and I can't re-publish the same version to crates.io.
diff --git a/Cargo.toml b/Cargo.toml index 6dbc901..b4b376c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.3" +version = "0.4.4" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
8f693ed8cf71131e69d375f3c964f03f40e8ed16
Steven Allen
2016-01-31T21:44:23
Bump to 0.4.3
diff --git a/Cargo.toml b/Cargo.toml index e4d65aa..6dbc901 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.2" +version = "0.4.3" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
2a31b5f89fe36960c0c48832159ea62c291804bb
Steven Allen
2016-01-30T21:20:43
Add support check functions. This makes it easy to determine if the terminal supports color.
diff --git a/src/lib.rs b/src/lib.rs index 6580245..e2b4fe8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -366,6 +366,15 @@ pub trait Terminal: Write { /// calling reset. fn reset(&mut self) -> Result<()>; + /// Returns true if reset is supported. + fn supports_reset(&self) -> bool; + + /// Returns t...
3
25
0
a26e25b8f9ae2a18fbdf3f9cbd07f8c25b6205c3
Steven Allen
2016-01-30T20:23:28
Release 0.4.2
diff --git a/Cargo.toml b/Cargo.toml index 9aae4b8..e4d65aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.1" +version = "0.4.2" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
6b81bbb472ccbbc2e98211935917a35932636190
Steven Allen
2016-01-30T20:21:31
Fix reset 1. sg doesn't exist. 2. sgr takes a param.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index a2caa7d..995d6a6 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -224,14 +224,16 @@ impl<T: Write + Send> Terminal for TerminfoTerminal<T> { } fn reset(&mut self) -> Result<()> { - // are there any terminals that have color/at...
1
7
5
6d38ded8b5d6650eee7795403d8e0dd76c2bf866
Steven Allen
2016-01-29T22:47:19
Bump to 0.4.1
diff --git a/Cargo.toml b/Cargo.toml index 0eae455..9aae4b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.4.0" +version = "0.4.1" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
a0c85479fc80be70a20853f33a1dcc832baefb0e
Steven Allen
2016-01-29T22:45:20
Add support conversion from Error to io::Error
diff --git a/src/lib.rs b/src/lib.rs index 3b01840..6580245 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -295,6 +295,16 @@ impl std::error::Error for Error { } } +impl From<Error> for io::Error { + fn from(err: Error) -> io::Error { + let kind = match &err { + &Error::Io(ref e) => e.kind(), ...
1
10
0
7276a4b9a596feaf5910cd982d51491e8fb99f53
Steven Allen
2016-01-26T16:47:23
Fixup crate attributes
diff --git a/src/lib.rs b/src/lib.rs index 3f7d0e4..3b01840 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,16 +57,11 @@ //! [ti]: https://en.wikipedia.org/wiki/Terminfo #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://www.rust-lang.org/favic...
1
3
8
43bc6943eff982daa5b48aa79414e263a39cf212
Steven Allen
2016-01-11T04:57:55
bump to 0.4.0
diff --git a/Cargo.toml b/Cargo.toml index 5c44ff0..0eae455 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.3.0" +version = "0.4.0" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
e14359dca33383202ffba70d6dad237928915ce5
Steven Allen
2015-12-30T22:50:07
Don't format names.
diff --git a/src/terminfo/parser/names.rs b/src/terminfo/parser/names.rs index 1276129..795ff84 100644 --- a/src/terminfo/parser/names.rs +++ b/src/terminfo/parser/names.rs @@ -1,4 +1,5 @@ #![allow(non_upper_case_globals, missing_docs)] +#![cfg_attr(rustfmt, rustfmt_skip)] pub static boolfnames: &'static [&'static ...
1
1
0
3ae6bb07daa880fe2891d756899c2af418ae131e
Corey Richardson
2015-12-14T02:03:25
Patch up the Windows terminal to return Ok(()) in all cases
diff --git a/src/win.rs b/src/win.rs index 14be7b7..3eeebb6 100644 --- a/src/win.rs +++ b/src/win.rs @@ -205,11 +205,15 @@ impl<T: Write+Send> Terminal for WinConsole<T> { if kernel32::GetConsoleScreenBufferInfo(handle, &mut buffer_info) != 0 { let (x, y) = (buffer_info.dwCursorPosition.X,...
1
10
4
036f1844b93bf09e542260071b9a408860ec9383
Corey Richardson
2015-12-14T01:09:04
Rename some variants, add __Nonexhaustive, fix tests.
diff --git a/src/lib.rs b/src/lib.rs index 23607be..5ff9535 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -48,7 +48,7 @@ //! t.fg(term::color::RED).unwrap(); //! writeln!(t, "world!").unwrap(); //! -//! assert!(t.reset().unwrap()); +//! t.reset().unwrap(); //! } //! ``` //! @@ -190,8 +190,8 @@ pub e...
4
81
16
0961aa7a50e0a6b2be42b07a61a6de53f30bfe68
Steven Allen
2015-12-09T15:01:13
shorten type (nit)
diff --git a/src/win.rs b/src/win.rs index 01cbffe..0455dfb 100644 --- a/src/win.rs +++ b/src/win.rs @@ -246,7 +246,7 @@ impl<T: Write+Send> Terminal for WinConsole<T> { unsafe { let mut buffer_info = ::std::mem::uninitialized(); if kernel32::GetConsoleScreenBufferInfo(handle, &mut bu...
1
1
1
ddc7826955c5913ed67e8067d5a958e8483527ed
Corey Richardson
2015-11-28T22:02:15
Error handling overhaul This yanks out all the String types in Results and replaces them with fine-grained enums. Closes #45
diff --git a/Cargo.toml b/Cargo.toml index 6b43f65..5c44ff0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.2.14" +version = "0.3.0" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md" diff --git a/src/lib.rs b/s...
6
341
187
7ded40811b4d207cdf387308145cb3c1bffae03c
Steven Allen
2015-11-30T05:23:47
destructure (nit).
diff --git a/src/win.rs b/src/win.rs index 82ecd84..01cbffe 100644 --- a/src/win.rs +++ b/src/win.rs @@ -246,7 +246,7 @@ impl<T: Write+Send> Terminal for WinConsole<T> { unsafe { let mut buffer_info = ::std::mem::uninitialized(); if kernel32::GetConsoleScreenBufferInfo(handle, &mut bu...
1
1
1
6a92508a827444b856449ff725c3a602dd65f266
Steven Allen
2015-11-24T16:45:31
Return an error when expansion fails. Failed expansion doesn't mean that the operation is unsupported, it means that the terminfo database is broken.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 4386e4c..98aa464 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -200,12 +200,11 @@ impl<T: Write+Send> Terminal for TerminfoTerminal<T> { }).next() { Some(op) => match expand(&op, &[], &mut Variables::new()) { ...
1
8
9
bc999d613a7d75a198e442b947b9f54b16e7ec40
Steven Allen
2015-11-24T05:17:49
Allow generic construction of terminfo from path
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 21a7760..4386e4c 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -103,7 +103,11 @@ impl TermInfo { } /// Parse the given TermInfo. - pub fn from_path(path: &Path) -> Result<TermInfo, Error> { + pub fn from_path<P: AsRef<Path>>(...
1
5
1
825011128a5c0466a1aa05cb92b8debf40b4343b
Steven Allen
2015-11-24T03:48:32
Cut a new release. There have been significant bugfixes (format string handling is now more correct).
diff --git a/Cargo.toml b/Cargo.toml index 457ac28..6b43f65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.2.13" +version = "0.2.14" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
031b0eb86abbee0146c89ee03d77eea7746b27c7
Steven Allen
2015-11-24T03:46:32
The terminfo database uses i16 but ncurses uses c_int for variables. We're just going to use i32 as this doesn't appear to be documented anywhere and c_int is 32bits on most platforms.
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 3287b83..21a7760 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -153,7 +153,7 @@ impl<T: Write+Send> Terminal for TerminfoTerminal<T> { fn fg(&mut self, color: color::Color) -> io::Result<bool> { let color = self.dim_if_necessary(...
2
7
7
99696e53611191d231b1961e7ee3f49d46c216d8
Steven Allen
2015-11-24T03:42:13
Don't need to check bounds.
diff --git a/src/terminfo/parm.rs b/src/terminfo/parm.rs index 9f68f62..9ee8299 100644 --- a/src/terminfo/parm.rs +++ b/src/terminfo/parm.rs @@ -125,7 +125,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) 'c' => match stack.pop() { // if c is 0, use 02...
1
1
1
c62def53fbe3808ab14c4e382493afcd80879675
Steven Allen
2015-11-14T03:25:30
Fix format string handling. Make it actually obey the C spec.
diff --git a/src/terminfo/parm.rs b/src/terminfo/parm.rs index 2cb4467..9f68f62 100644 --- a/src/terminfo/parm.rs +++ b/src/terminfo/parm.rs @@ -15,9 +15,7 @@ use self::States::*; use self::FormatState::*; use self::FormatOp::*; -use std::ascii::AsciiExt; use std::iter::repeat; -use std::mem::replace; #[derive(...
1
41
58
07062976fb1a639619ab0efa612255c36766a3ee
Steven Allen
2015-11-12T21:03:48
Avoid unnecessary allocation and conversions.
diff --git a/src/win.rs b/src/win.rs index 694d794..82ecd84 100644 --- a/src/win.rs +++ b/src/win.rs @@ -15,10 +15,8 @@ extern crate kernel32; extern crate winapi; -use std::ffi::OsStr; use std::io::prelude::*; use std::io; -use std::os::windows::ffi::OsStrExt; use std::ptr; use Attr; @@ -74,11 +72,10 @@ fn b...
1
3
6
a82086b9084a7d54a836d087fbc5a3ec0bc40212
Steven Allen
2015-11-12T19:30:56
Avoid unwrap
diff --git a/src/terminfo/parm.rs b/src/terminfo/parm.rs index 1706111..2cb4467 100644 --- a/src/terminfo/parm.rs +++ b/src/terminfo/parm.rs @@ -124,129 +124,63 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) Percent => { match cur { '%' => { outpu...
2
75
151
74e1432bbcfd8c2f29458887193feef04b20605b
Steven Allen
2015-11-12T16:49:30
work towards being rustfmt compatible
diff --git a/src/terminfo/parser/compiled.rs b/src/terminfo/parser/compiled.rs index ae3363d..23fe75a 100644 --- a/src/terminfo/parser/compiled.rs +++ b/src/terminfo/parser/compiled.rs @@ -255,23 +255,25 @@ pub fn parse(file: &mut io::Read, longnames: bool) -> Result<TermInfo, String> { for names se...
1
6
4
5c221ab0f8e4fc1bcf1cc351abf2e7a5707ea0a3
Steven Allen
2015-11-08T14:56:52
bump to 0.2.13
diff --git a/Cargo.toml b/Cargo.toml index 59101ee..457ac28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.2.12" +version = "0.2.13" authors = ["The Rust Project Developers", "Steven Allen"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
66cb49afe60f5e24b9500b21a322bc6e5fac9a2c
Steven Allen
2015-11-08T14:56:28
update kernel32 dep
diff --git a/Cargo.toml b/Cargo.toml index e7c967d..59101ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ A terminal formatting library [dependencies] winapi = "0.2" -kernel32-sys = "0.1" +kernel32-sys = "0.2"
1
1
1
5bd21d36f96c790fa22658df52ad0e1f88955492
Steven Allen
2015-10-08T19:52:27
Document that reset doesn't flush. closes #41
diff --git a/src/lib.rs b/src/lib.rs index c475e39..14e67a0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -213,10 +213,16 @@ pub trait Terminal: Write { /// Returns whether the given terminal attribute is supported. fn supports_attr(&self, attr: Attr) -> bool; - /// Resets all terminal attributes and color...
1
7
1
65fef25e765a50b7a1a7d7a73cbc0edeee62d4e4
ranoia
2015-09-03T23:52:59
Read terminfo through a buffer Reduce the read-syscalls from ~400 to 1 at terminfo parsing
diff --git a/src/terminfo/mod.rs b/src/terminfo/mod.rs index 36289fd..3287b83 100644 --- a/src/terminfo/mod.rs +++ b/src/terminfo/mod.rs @@ -17,6 +17,7 @@ use std::fmt; use std::fs::File; use std::io::prelude::*; use std::io; +use std::io::BufReader; use std::path::Path; use Attr; @@ -103,12 +104,10 @@ impl Term...
1
5
6
2e1e9a1feaf290580384262bc7a4497a0c0f928a
Brian Anderson
2015-08-09T21:18:06
Remove some unneeded disambiguation in the doc examples
diff --git a/src/lib.rs b/src/lib.rs index 197e425..29c81bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,10 +43,10 @@ //! let mut t = term::stdout().unwrap(); //! //! t.fg(term::color::GREEN).unwrap(); -//! (write!(t, "hello, ")).unwrap(); +//! write!(t, "hello, ").unwrap(); //! //! t.fg(ter...
1
2
2
cb166b459b29513e82788b9bd134df63a4b3e2fb
Alex Crichton
2015-07-14T14:05:12
Bump to 0.2.11
diff --git a/Cargo.toml b/Cargo.toml index 13737bd..3a43167 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.2.10" +version = "0.2.11" authors = ["The Rust Project Developers"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
21af3a61546bb336e4f25a22872be093ebbd5705
Alex Crichton
2015-07-14T14:02:19
Bump dependency on winapi
diff --git a/Cargo.toml b/Cargo.toml index d1c6429..13737bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,5 +13,5 @@ A terminal formatting library """ [dependencies] -winapi = "0.1" +winapi = "0.2" kernel32-sys = "0.1"
1
1
1
b817658e0edade7f5a6af612cd257a6e3bf2dc68
Alex Crichton
2015-07-07T16:41:43
Bump to 0.2.10
diff --git a/Cargo.toml b/Cargo.toml index bc8dcc1..d1c6429 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "term" -version = "0.2.9" +version = "0.2.10" authors = ["The Rust Project Developers"] license = "MIT/Apache-2.0" readme = "README.md"
1
1
1
c8937f502e6378e30873ad7dd8bce271942ad6f1
Fraser Hutchison
2015-07-07T13:33:59
Allow missing docs for various statics and constants.
diff --git a/src/lib.rs b/src/lib.rs index ea4a10b..197e425 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,6 +128,7 @@ pub fn stderr() -> Option<Box<StderrTerminal>> { /// Terminal color definitions +#[allow(missing_docs)] pub mod color { /// Number for a terminal color pub type Color = u16; diff --gi...
2
2
1