tldr-pages/tldr-python-client

Option to omit ({language}) in --list

Closed this issue · 2 comments

Please add some option for get_commands to omit ({language}) when --list command used.

Pain: I am trying to reproduce https://dev.to/helderberto/integrating-tldr-with-fzf-2377
So I need something like tldr --list | fzf | xargs tldr but for Windows.
At the moment, second fzf fails because of the language

> tldr --list | Get-Unique | fzf --preview "tldr -c {1}" --preview-window=right,70%
attrib (en)

> tldr @(tldr --list | Get-Unique | fzf --preview "tldr -c {1}" --preview-window=right,70%)
`attrib (en)` documentation is not available.
If you want to contribute it, feel free to send a pull request to: https://github.com/tldr-pages/tldr

Temporary workaround - .trim(" (en)")
But it's a dirty trick, and in the first menu I still see noisy (en) for each line.

But the result is better than nothing

$ tldr @(tldr --list | Sort-Object | Get-Unique | fzf --preview "tldr -c {1}" --preview-window=right,70%).trim(" (en)")

  bcdboot

  Configure or repair boot files.
  More information: https://learn.microsoft.com/windows-hardware/manufacture/desktop/bcdboot-command-line-options-techref-di.

  - Initialize the system partition by using BCD files from the source Windows folder:
    bcdboot C:\Windows

  - Enable [v]erbose mode:
    bcdboot C:\Windows /v

  - Specify the volume letter of the [s]ystem partition:
    bcdboot C:\Windows /s S:

  - Specify a [l]ocale:
    bcdboot C:\Windows /l en-us

  - Specify a [f]irmware type while copying the boot files to a specified volume:
    bcdboot C:\Windows /s S: /f UEFI|BIOS|ALL

or

$ navi --query @(tldr --list | Sort-Object | Get-Unique | fzf --preview "tldr -c {1}" --preview-window=right,70%).trim(" (en)")
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Specify a [f]irmware type while copying the boot files to a specified volume [bcdboot, windows]                                                                                            │
│ bcdboot <C:\Windows> /s <S:> /f <UEFI|BIOS|ALL>                                                                                                                                            │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘


▌ bcdboot, windows                                   ⠀Specify a [f]irmware type while copying the boot files to a specified volume     ⠀bcdboot <C:\Windows> /s <S:> /f <UEFI|BIOS|ALL>    ⠀
  bcdboot, windows                                   ⠀Specify a [l]ocale                                                               ⠀bcdboot <C:\Windows> /l <en-us>                    ⠀
  bcdboot, windows                                   ⠀Specify the volume letter of the [s]ystem partition                              ⠀bcdboot <C:\Windows> /s <S:>                       ⠀
  bcdboot, windows                                   ⠀Enable [v]erbose mode                                                            ⠀bcdboot <C:\Windows> /v                            ⠀
  bcdboot, windows                                   ⠀Initialize the system partition by using BCD files from the source Windows fol…  ⠀bcdboot <C:\Windows>

I filed a PR to fix this