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.

  • RedWeasel@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 day ago

    Or if you are lazy you could add “-h” as an option to said help command for when --help doesn’t work. Shouldn’t take to long to to make a list with a script that runs each command to with --help and logs it all to a file though. Then just go look for the ones that don’t like it in the log. Apparently bash has a builtin command named help, so a different name is probably better then.

    ls -1 $dir | while read line do echo “----------” $line --help |& >> logfile.txt done

    Just search in you favorite pager for “-----” and just hit “next” key.