sunaku / dasht

💁 Search API docs offline, in terminal or browser
https://sunaku.github.io/dasht/man
827 stars 26 forks source link

update dasht-query-line and dasht-query-html to work with tsv #56

Closed smackesey closed 3 years ago

smackesey commented 3 years ago

I extracted my work on TSV from the other Dash.app integration fork so that this could be separately merged. It follows your requests in #38.

smackesey commented 3 years ago

Made the changes!

smackesey commented 3 years ago

Thanks! So I made the changes you listed, but I was unable to apply the patch. I've never applied a patch file to a git repo before so perhaps I was doing something wrong, but I tried git apply /path/to/patch-file and got an error message:

error: patch failed: bin/dasht-query-line:261
error: bin/dasht-query-line: patch does not apply
sunaku commented 3 years ago

Looks great, thanks! I'll try this out for a few days and let you know. Overall, we should be good to merge. :+1:

sunaku commented 3 years ago

Hi @smackesey, I found an issue when searching the BASH docset:

  1. Before this PR

    $ dasht 1 bash
    digit-argument (M-0, M-1, … M--)  Bash function
    PS1                               Bash variable
    self-insert (a, b, A, 1, !, …)    Bash function
  2. After this PR:

    $ dasht 1 bash
    digit-argument  (M-0, m-1,
    PS1              Bash variable
    self-insert       (a, b,

Following the first result link shows a Can't load %E2%80%A6 error in w3m.

smackesey commented 3 years ago

Fixed, the issue was that the awk field separator was still set to the default instead of tab. It didn't affect without spaces in the name, but screwed up those like the ones you posted. Sorry about that.

sunaku commented 3 years ago

Sorry for the long delay. :sweat_smile: I'll merge this PR soon (ETA this week).

sunaku commented 3 years ago

Merged in commit 882c7f2a6d23aee57d6220eec42a6e101fc8a60a. Thanks for your contribution :pray: and sorry for the long delay! :sweat_smile: