Open amosnier opened 1 year ago
Thanks! I'm currently busy with deadlines. Will take a look after my life is better.
For the record, I have created raco-fmt-or-cat for my own short term needs. And of course, that's because I really like raco fmt
, by the way.
Please see https://github.com/benknoble/vim-racket/issues/11#issuecomment-1468604099. What I'm explaining in that comment is basically that I no longer consider what I described here as an issue. In other words, as far as I am concerned, this issue may be closed. I will also make my workaround private, as I would not recommend anybody to use it.
Was discussed in https://github.com/sorawee/fmt/issues/43, but I now create a specific issue, for the sake of clarity. @sorawee, please feel free to (re-)close https://github.com/sorawee/fmt/issues/43 if you think nothing should be done about the comment "issue".
Minimal example for this issue:
Please note that after the first
4
, I press<return>
and<ctrl-d>
.raco fmt
then outputs my unchanged input, which is what I expect. On the other hand:That is when pressing
<return>
and<ctrl-d>
after(define
. There my input is gone, which might be intended, but makes the program unusable as a filter, as far as I know.For the sake of completion, what
raco fmt -i
does is as far as I know perfectly fine. This issue is only relevant when the output is sent to standard out (and standard error) in case of error. Getting the error message to standard error is then perfectly fine too, since it can easily be redirected. The issue in this case is that nothing comes to standard out. That prevents the program from being used as a true filter, which would be composable through pipelines (typical UNIX principle). In that case, just outputting the input to standard out would solve this issue.