Skip to content

Commit 482beb7

Browse files
authored
BREAKING CHANGE: disable reopen of stdout (#43)
* BREAKING CHANGE: Disable reopening of stdout - I like piping to lolcat which broke with reopen * Remove unused import * Bump version
1 parent abec8bd commit 482beb7

6 files changed

Lines changed: 12 additions & 37 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.28)
22
project("SL"
3-
VERSION 6.0.3
3+
VERSION 6.1.0
44
DESCRIPTION "CHOO CHOO"
55
LANGUAGES C)
66

@@ -10,10 +10,10 @@ install(FILES ${CURSES_DLL} ${SL_EXE} DESTINATION bin COMPONENT applications)
1010
set(CPACK_PACKAGE_NAME "sl")
1111
set(CPACK_PACKAGE_VENDOR "sl")
1212
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SL (Steam Locomotive)")
13-
set(CPACK_PACKAGE_VERSION "6.0.3")
13+
set(CPACK_PACKAGE_VERSION "6.1.0")
1414
set(CPACK_PACKAGE_VERSION_MAJOR "6")
15-
set(CPACK_PACKAGE_VERSION_MINOR "0")
16-
set(CPACK_PACKAGE_VERSION_PATCH "3")
15+
set(CPACK_PACKAGE_VERSION_MINOR "1")
16+
set(CPACK_PACKAGE_VERSION_PATCH "0")
1717
set(CPACK_PACKAGE_INSTALL_DIRECTORY "sl")
1818
set(CPACK_COMPONENTS_ALL applications)
1919
set(CPACK_COMPONENT_APPLICATIONS_DISPLAY_NAME "sl")

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sl"
3-
version = "6.0.3"
3+
version = "6.1.0"
44
edition = "2021"
55
build = "build.rs"
66

@@ -20,6 +20,6 @@ unicode-segmentation = "1.12.0"
2020

2121
[build-dependencies]
2222
clap = { version = "4.5.23", features = ["derive"] }
23-
clap_complete = "4.5.38"
23+
clap_complete = "4.5.40"
2424
clap_mangen = "0.2.24"
2525
cmake = "0.1.52"

completions/sl.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.ie \n(.g .ds Aq \(aq
22
.el .ds Aq '
3-
.TH sl 1 "sl 6.0.3"
3+
.TH sl 1 "sl 6.1.0"
44
.SH NAME
55
sl \- sl cures your bad habit of mistyping
66
.SH SYNOPSIS
@@ -30,6 +30,6 @@ Print help
3030
\fB\-V\fR, \fB\-\-version\fR
3131
Print version
3232
.SH VERSION
33-
v6.0.3
33+
v6.1.0
3434
.SH AUTHORS
3535
Toyoda Masashi (mtoyoda@acm.org)

src/freopen.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/main.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ use core::time;
44
use crossterm::event::{poll, read, Event, KeyCode, KeyEvent, KeyModifiers};
55
use crossterm::terminal::{Clear, ClearType};
66
use crossterm::{cursor, terminal, ExecutableCommand, QueueableCommand};
7-
use freopen::reopen_stdout;
87
use sl::{print_c51, print_d51, print_sl, set_locale, COLS, LINES};
98
use std::fs;
10-
use std::io::{stdin, stdout, BufRead, Error, IsTerminal, Stdin, Stdout, Write};
9+
use std::io::{stdin, stdout, BufRead, Error, IsTerminal, Stdin, Write};
1110

1211
mod cli;
13-
mod freopen;
1412
mod sl;
1513

1614
fn main() -> Result<(), Error> {
@@ -41,11 +39,6 @@ fn main() -> Result<(), Error> {
4139
};
4240

4341
let mut stdout = stdout();
44-
if !Stdout::is_terminal(&stdout) {
45-
names.iter().for_each(|n| println!("{}", n));
46-
reopen_stdout()?;
47-
}
48-
4942
terminal::enable_raw_mode()?;
5043
stdout.execute(cursor::Hide)?;
5144
unsafe {

0 commit comments

Comments
 (0)