Charles Strahan

Results 61 comments of Charles Strahan

I was just about to open an issue for precisely this. Would be great to have `as-tree` gracefully exit in this scenario.

@jez assuming your terminal height is less than 10,000 characters (quite probable :sweat_smile:), this should do the trick: ``` seq 10000 | as-tree | less -FirSwX ``` then press `q`...

If you want a reproducer that doesn't depend on a tty: This uses a sleep so that the "a" char is piped into `as-tree` _after_ the bash process exits: ```...

You can remove the `sleep` from my previous examples by using `stdbuf` to disable output buffering for `as-tree`'s stdout; also, the `bash -c ''` can be replaced with a subshell...

FWIW, looks like this is how `fd` handles this: https://github.com/sharkdp/fd/blob/b928af7d9c4c174791cb23a58bbc4e724c2fbb9b/src/output.rs#L36-L39 ``` if r.is_err() { // Probably a broken pipe. Exit gracefully. process::exit(ExitCode::GeneralError.into()); } ```

@ntalbott Hey, thanks for your interest in the library. Unfortunately, I've been incredibly swamped and haven't had a chance to complete things; as a work-in-progress, it's still very much broken....

@Spaceghost Thanks :). I'll set aside some time this weekend to work on this.

Any update on this? I'm experiencing the exact same thing. It's sort of frustrating, because the `ToggleBG` function in the solarized theme checks `g:colors_name` to determine if it should reload...

@nathan7 We're already using a small Go program for the `dockerTools` functions, so I would feel comfortable with your approach using Go. A PR for better DO support would be...

@fredbi Have some code you can throw up somewhere?