Skip to content

Commit

Permalink
Fix piping to Helix on macOS (#5468)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyogo authored Jul 13, 2023
1 parent e86bb64 commit 0e0501c
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 @@ -211,11 +211,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 0e0501c

Please sign in to comment.