Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Beautiful man pages on #OpenBSD with bat 🐱$ doas pkg_add bat$ man pf.conf | bat -pl man

Beautiful man pages on #OpenBSD with bat 🐱$ doas pkg_add bat$ man pf.conf | bat -pl man

Scheduled Pinned Locked Moved Uncategorized
openbsd
14 Posts 8 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • bryan@dusty.ninjaB This user is from outside of this forum
    bryan@dusty.ninjaB This user is from outside of this forum
    bryan@dusty.ninja
    wrote last edited by
    #4

    @justine
    Woah, a Korn shell user. πŸ‘€

    1 Reply Last reply
    0
    • hucste@framapiaf.orgH This user is from outside of this forum
      hucste@framapiaf.orgH This user is from outside of this forum
      hucste@framapiaf.org
      wrote last edited by
      #5

      @justine

      Why do you rewrite a new man function?

      I dont understand why you added `col -bx`? Option `-l` seems to arrange the text in columns; what is the diff?

      justine@snac.smithies.me.ukJ 1 Reply Last reply
      0
      • hucste@framapiaf.orgH hucste@framapiaf.org

        @justine

        Why do you rewrite a new man function?

        I dont understand why you added `col -bx`? Option `-l` seems to arrange the text in columns; what is the diff?

        justine@snac.smithies.me.ukJ This user is from outside of this forum
        justine@snac.smithies.me.ukJ This user is from outside of this forum
        justine@snac.smithies.me.uk
        wrote last edited by
        #6
        https://man.openbsd.org/col
        hucste@framapiaf.orgH 1 Reply Last reply
        0
        • justine@snac.smithies.me.ukJ justine@snac.smithies.me.uk
          https://man.openbsd.org/col
          hucste@framapiaf.orgH This user is from outside of this forum
          hucste@framapiaf.orgH This user is from outside of this forum
          hucste@framapiaf.org
          wrote last edited by
          #7

          @justine

          Excuse-me, but I dont understand more! 😞
          I've read the col manpage, (before asking) but I dont understand why adding it to bat!

          justine@snac.smithies.me.ukJ 1 Reply Last reply
          0
          • ricardo@mastodon.bsd.cafeR ricardo@mastodon.bsd.cafe

            @obj Hope to see https://github.com/plp13/qman soon in ports πŸ––πŸ»

            pirateprentice@bsd.networkP This user is from outside of this forum
            pirateprentice@bsd.networkP This user is from outside of this forum
            pirateprentice@bsd.network
            wrote last edited by
            #8

            @ricardo @obj
            Even beautifuller man pages on #OpenBSD with mandoc (and mupdf as pdf-viewer)

            $ bman () { man -w "$1" | xargs mandoc -T pdf > /tmp/"$1".pdf; mupdf /tmp/"$1".pdf ; rm /tmp/"$1".pdf; }
            $ bman less

            Link Preview Image
            1 Reply Last reply
            0
            • hucste@framapiaf.orgH hucste@framapiaf.org

              @justine

              Excuse-me, but I dont understand more! 😞
              I've read the col manpage, (before asking) but I dont understand why adding it to bat!

              justine@snac.smithies.me.ukJ This user is from outside of this forum
              justine@snac.smithies.me.ukJ This user is from outside of this forum
              justine@snac.smithies.me.uk
              wrote last edited by
              #9
              Sorry trying to remember where I got that from but was something related to this.

              https://sebastiano.tronto.net/blog/2022-09-05-man-col/
              hucste@framapiaf.orgH 2 Replies Last reply
              0
              • justine@snac.smithies.me.ukJ justine@snac.smithies.me.uk
                Sorry trying to remember where I got that from but was something related to this.

                https://sebastiano.tronto.net/blog/2022-09-05-man-col/
                hucste@framapiaf.orgH This user is from outside of this forum
                hucste@framapiaf.orgH This user is from outside of this forum
                hucste@framapiaf.org
                wrote last edited by
                #10

                @justine
                OK, good!

                Thanks

                1 Reply Last reply
                0
                • justine@snac.smithies.me.ukJ justine@snac.smithies.me.uk
                  Sorry trying to remember where I got that from but was something related to this.

                  https://sebastiano.tronto.net/blog/2022-09-05-man-col/
                  hucste@framapiaf.orgH This user is from outside of this forum
                  hucste@framapiaf.orgH This user is from outside of this forum
                  hucste@framapiaf.org
                  wrote last edited by
                  #11

                  @justine @obj

                  See: https://doc.huc.fr.eu.org/en/post/bat-cat/ πŸ˜‰
                  (particularly the acknowledgements section) πŸ˜›

                  justine@snac.smithies.me.ukJ 1 Reply Last reply
                  0
                  • hucste@framapiaf.orgH hucste@framapiaf.org

                    @justine @obj

                    See: https://doc.huc.fr.eu.org/en/post/bat-cat/ πŸ˜‰
                    (particularly the acknowledgements section) πŸ˜›

                    justine@snac.smithies.me.ukJ This user is from outside of this forum
                    justine@snac.smithies.me.ukJ This user is from outside of this forum
                    justine@snac.smithies.me.uk
                    wrote last edited by
                    #12
                    Haha very nice ! Thank you ❀️

                    CC: @obj@bsd.cafe
                    1 Reply Last reply
                    0
                    • obj@mastodon.bsd.cafeO obj@mastodon.bsd.cafe

                      Beautiful man pages on #OpenBSD with bat 🐱
                      $ doas pkg_add bat
                      $ man pf.conf | bat -pl man

                      jhx@mastodon.bsd.cafeJ This user is from outside of this forum
                      jhx@mastodon.bsd.cafeJ This user is from outside of this forum
                      jhx@mastodon.bsd.cafe
                      wrote last edited by
                      #13

                      @obj
                      I use neovim as my pager here - also pretty cool πŸ™‚

                      export MANPAGER='nvim +Man!'

                      1 Reply Last reply
                      0
                      • izder456@fe.disroot.orgI This user is from outside of this forum
                        izder456@fe.disroot.orgI This user is from outside of this forum
                        izder456@fe.disroot.org
                        wrote last edited by
                        #14

                        @justine@snac.smithies.me.uk @obj@bsd.cafe
                        i use zsh on my OpenBSD boxes:
                        this is what i came up with:

                        if command -v bat &> /dev/null; then
                            zsh-defer eval $(bat --completion zsh)
                            export BAT_THEME=ansi
                            alias cat="bat -pp"
                            alias bat="bat -p"
                            # colored manpages
                            function man {
                                sh -c "man '$@' | col -bx | \bat -pl man"
                            }
                            # colored -h and --help
                            alias -g -- -h='-h 2>&1 | \bat -pl help'
                            alias -g -- --help='--help 2>&1 | \bat -pl help'
                            # help command
                            function help {
                                sh -c "'$@' --help 2>&1 | \bat -pl help"
                            }
                        fi
                        

                        the if command -v bat bit is nice to have in case bat for whatever reason isn't on your system.

                        1 Reply Last reply
                        1
                        0
                        • R relay@relay.mycrowd.ca shared this topic
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups