1. 16

    apropos(1) already does full text search on your man pages and doesn’t require Java and gigs of memory

    edit: not to say this isn’t clever, I’m just not convinced it’s economical

    1. 3

      Hi, the post is about playing around with elasticsearch and experiment with its features on the Linux man pages (language analyzers, cutoff frequency etc). Of course, having to setup an elasticsearch instance to search man pages is not a convenient method. Thank you for your feedback.

      1. 2

        I think the idea behind this is neat, although ES might be a bit heavy - have you looked at embedded FTS systems such as Xapian or even SQLite’s FTS extension?

        1. 2

          Nope, I’ll take a look, thank you

    1. 3

      This is an awesome use case for ElasticSearch, thanks for sharing this.

      I really enjoy learning new shell commands. I moved from bash to zsh mainly for command and parameters autocompletion so I could learn and discover new commands quickly. man pages are often big and cluttered with a lot of details. I never though of searching in all of them at the same time, but it totally makes sens.

      I use tldr a lot and I think a similar implementation could be handy :)

      This post is also a nice way to learn how to use ElasticSearch, nice work!

      1. 1

        Thank you for the feedback!

      1. 3

        Thanks for writing this! I recently discovered a lot of this myself, from multiple short blog posts that never quite answered the questions I had. I would’ve been in a better place with this blog post. One interesting topic that I’ve had problems with is dealing with cross-platform issues. For example, on OS-X’s default version of bash, you can’t set the auto-complete options after registering the function (e.g for when you might want whitespace optionally after the completion). The workaround sadly looks like this: https://github.com/eeue56/elm-bash-completion/blob/master/_elm_format.sh#L21

        Do you have any idea of a better solution for that problem?

        1. 1

          Thank you!

          Unfortunately I don’t have a better solution to suggest. Great work btw! If anything pops up in my mind I’ll get back to you.

          1. 11

            https://lobste.rs/s/omgnew/creating_bash_completion_script

            Funny identifier on the lobste.rs url: omgnew :D