psibi / tldr-hs

Haskell tldr client
BSD 3-Clause "New" or "Revised" License
92 stars 14 forks source link

tldr output formatting not compatible with tldr python or rust clients #44

Closed fazlearefin closed 2 years ago

fazlearefin commented 2 years ago

This Haskell client of tldr displays tldr pages differently to the official python and rust clients.

This Haskell implementation of tldr shows tldr cat like this (I am using 0.6.4 bundled with Ubuntu 22.04):

cat
Print and concatenate files.More information: https://www.gnu.org/software/coreutils/cat.

 - Print the contents of a file to the standard output:
   cat {{file}}

 - Concatenate several files into the target file:
   cat {{file1}} {{file2}} > {{target_file}}

 - Append several files into the target file:
   cat {{file1}} {{file2}} >> {{target_file}}

 - Number all output lines:
   cat -n {{file}}

 - Display non-printable and whitespace characters (with M- prefix if non-ASCII):
   cat -v -t -e {{file}}

However, both the python and rust implementations of tldr displays like this:

cat

  Print and concatenate files.
  More information: https://www.gnu.org/software/coreutils/cat.

  - Print the contents of a file to the standard output:
    cat file

  - Concatenate several files into the target file:
    cat file1 file2 > target_file

  - Append several files into the target file:
    cat file1 file2 >> target_file

  - Number all output lines:
    cat -n file

  - Display non-printable and whitespace characters (with `M-` prefix if non-ASCII):
    cat -v -t -e file

So this Haskell implementation:

psibi commented 2 years ago

This is how it display in version 0.9.1:

tldr_cat

fazlearefin commented 2 years ago

Looks good then. Too bad Ubuntu 22.04 is still stuck with 0.6.4