Kyle Meyer <[email protected]> wrote: > Eric Wong writes: > > > Eric Wong <[email protected]> wrote: > [...] > >> Alright, I think keeping it and only recommending it for stdout > >> (or --stdin with import) is the way to go. > >> > >> "-o format:/path/name" should be encouraged for regular file and > >> directory args. > > > > Actually, maybe "-o $format" be implicitly stdout? > > (and "-i $format" be implicitly stdin for convert|import) > > Hmm, true. If we went that route, I guess the format auto-detection in > LeiOverview::detect_fmt() (currently just for maildir) would be dropped > because an -o argument without a colon would be taken as the format > rather than a destination that the format can be detected from?
Maybe not dropped, but probably tweaked for DWIM-ness. Maybe: If somebody wants a Maildir to dump JSON search results in they could use "-o ./json" or "-o json/" or "-o /path/to/json". "-o json" (no slashes or colons) would mean JSON output to stdout. But then, "json" could be the name of an existing directory, so if it exists... Part of me thinks its too magical... On the other hand, maybe only requiring the colon: "-o json:" is enough to disambiguate and isn't too much typing. We'll just assume nobody would want to end a directory with ":". They can still use "-o maildir:/i/like/colons:" if they really want to end a dirname with ":" for whatever reason... -- unsubscribe: one-click, see List-Unsubscribe header archive: https://public-inbox.org/meta/
