Open mrnoname1000 opened 5 months ago
Okay, I worked through implementing this (twice actually lol) and @emanuele6 pointed out a flaws with this. manually specifying -f -
avoids a lot of weird edge cases in shell scripts where stdin has already been redirected that would require tacking on a < /dev/null
. see #288 discussion for more details. @bagder can we close this issue?
I would argue that behavior is correct, since almost every other text processing utility behaves that way, e.g. cat "$@"
or sed 's/foo/bar/' "$@"
(without checking for a tty I might add).
However, it sounds like this would be a major, breaking change to trurl. I'd be fine closing this issue but I'd like to highlight #274 which would somewhat mitigate my gripes.
Having to specify
-f -
when using trurl in a pipeline is a little clunky. IMO if no URLs are provided on the command line, trurl should behave as if-f -
was passed. This would streamline the usage of trurl in a pipeline and make it behave more like a Unix text-processing utility. It also has the benefit of not changing any existing behavior except error handling.