tldr-pages / tldr-python-client

Python command-line client for tldr pages
https://pypi.org/project/tldr/
MIT License
592 stars 92 forks source link

`tldr --list` output should be not in a list #230

Closed fazlearefin closed 6 months ago

fazlearefin commented 6 months ago

Running tldr --list outputs a long single line containing a list. This makes it difficult to grep for a particular command of interest (unless grep complex regex is used). tldr --list should output available commands separated by newlines just like the official rust client.

tldr --list | grep docker
# OH MY!
vitorhcl commented 6 months ago

Is your version updated? This is a duplicate of #221 fixed by #222, actually.

fazlearefin commented 6 months ago

~Yes, version is updated~. Looks like no new release was made after the fix.

Please see screendump below:

root@4f9f90526bf9:~#
root@4f9f90526bf9:~# pip3 install tldr
Collecting tldr
  Downloading tldr-3.2.0-py3-none-any.whl (11 kB)
Collecting termcolor
  Downloading termcolor-2.4.0-py3-none-any.whl (7.7 kB)
Collecting colorama
  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting shtab>=1.3.10
  Downloading shtab-1.7.0-py3-none-any.whl (14 kB)
Installing collected packages: termcolor, shtab, colorama, tldr
Successfully installed colorama-0.4.6 shtab-1.7.0 termcolor-2.4.0 tldr-3.2.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@4f9f90526bf9:~#
root@4f9f90526bf9:~# tldr --version
tldr 3.2.0 (Client Specification 1.5)
root@4f9f90526bf9:~#
root@4f9f90526bf9:~# tldr --list
[]
root@4f9f90526bf9:~# tldr --update
Updated cache for 4813 entries
root@4f9f90526bf9:~#
root@4f9f90526bf9:~# tldr --list
['apx-subsystems', 'acountry', 'e2image', 'steghide', 'blkid', 'prename', 'sed', 'pmap', 'sport', 'btrfs-scrub', 'rtorrent', 'pdfcrop', 'paru', 'systemd-ac-power', 'gsettings', 'rc-update', 'qm-disk-resize', 'reflector', 'blastn', 'chkconfig', 'mac2unix', 'drawing', 'cpufreq-set', 'v4l2-ctl', 'gedit', 'pacman-mirrors', 'mkswap', 'debootstrap', 'lvs', 'compress', 'lrzip', 'reboot', 'speedometer', 'cam', 'fold', 'debugfs', 'toolbox-enter', 'getopt', 'resize2fs', 'nordvpn', 'cgroups', 'getfacl', 'swaplabel', 'qm-showcmd', <snip>
kbdharun commented 6 months ago

~Yes, version is updated~. Looks like no new release was made after the fix.

Yep, I think we can do a release here post implementing the placeholder escaping part (btw I am planning to make a Client specification release this weekend in the main repo, so the Python client caching source would need to be updated too).

For now, I will mark this issue as completed.