Skip to content

Commit

Permalink
Fix piping to Helix on macOS (helix-editor#5468)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyogo authored and evanrichter committed Jul 18, 2023
1 parent fafadd5 commit e1bb8f1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions helix-term/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ grep-searcher = "0.1.11"
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
libc = "0.2.147"

[target.'cfg(target_os = "macos")'.dependencies]
crossterm = { version = "0.26", features = ["event-stream", "use-dev-tty"] }

[build-dependencies]
helix-loader = { version = "0.6", path = "../helix-loader" }

Expand Down
5 changes: 0 additions & 5 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,6 @@ impl Application {
}
} else if stdin().is_tty() || cfg!(feature = "integration") {
editor.new_file(Action::VerticalSplit);
} else if cfg!(target_os = "macos") {
// On Linux and Windows, we allow the output of a command to be piped into the new buffer.
// This doesn't currently work on macOS because of the following issue:
// https://github.com/crossterm-rs/crossterm/issues/500
anyhow::bail!("Piping into helix-term is currently not supported on macOS");
} else {
editor
.new_file_from_stdin(Action::VerticalSplit)
Expand Down

0 comments on commit e1bb8f1

Please sign in to comment.