Or is there maybe a way to set the pager for all help related queries to some command? I’m using bat and would like to pipe all --help through | bat --language=help by default for the syntax highlighting and colored output… Or if you know a lower effort way to color the output of --help let me know.

  • kreskin@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    5 hours ago

    cd into the directory you want to test commands.

    bash

    for i in ls

    do

    $i --help >/dev/null 2>&1 && echo $i

    done

    any command which honors a --help will get listed. I suppose you could add a >> /tmp/output after the echo $i to log it. run it in /bin, /usr/bin, usr/local/bin

    ah …and that ls in the commands listed above is a backtick ls backtick. backtick is the key in the upper left hand corner of the keyboard which shares a key with ~