Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix piping to Helix on macOS #5468

Merged
merged 2 commits into from Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Expand Up @@ -70,6 +70,9 @@ grep-searcher = "0.1.11"
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
libc = "0.2.146"

[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
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