Summary: | textproc/code-minimap: New port textproc/code-minimap | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Derek Schrock <dereks> | ||||||
Component: | Individual Port(s) | Assignee: | Robert Clausecker <fuz> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | fuz | ||||||
Priority: | --- | ||||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
URL: | https://github.com/wfxr/code-minimap | ||||||||
Attachments: |
|
Description
Derek Schrock
2023-03-03 23:42:36 UTC
The upstream repository ships shell completion files. Please add a post-install target to install these files as per § 6.30 Porter's Handbook. Those are builtin to the command itself: nobody@13amd64-testing:/usr/ports/textproc/code-minimap % code-minimap completion -h code-minimap-completion Generate shell completion file USAGE: code-minimap completion <SHELL> ARGS: <SHELL> Target shell name [possible values: bash, elvish, fish, powershell, zsh] OPTIONS: -h, --help Print help information nobody@13amd64-testing:/usr/ports/textproc/code-minimap % code-minimap completion bash _code-minimap() { local i cur prev opts cmds .... (In reply to Derek Schrock from comment #2) Then you should add code in post-install or something that runs the binary to generate the completion files and install them into the right directories. You can check devel/goreleaser for an example of this idea. I don't know what the right directory for elvish completion files is, though. They would be opt in by the user eval'ing the output or adding it directly to a startup file. This is similar to pip's completion. npm provides completion the same way, with a completion file as part of the port but doesn't install a file to the .d system dirs. But if you insist on polluting a shell's env that's fine. (In reply to Derek Schrock from comment #4) The Porter's Handbook strongly recommends installing shell completion files unconditionally. I'm not sure how these “pollute the environment.” They are only evaluated if completion of the command in question is attempted and when that happens, you want the completion file to run. As far as I know, shell completion files do not cause any environment variables or shell variables to be set unless executed perhaps. Could you perhaps explain a common situation in which installation of shell completion files is not desirable? > npm provides completion the same way, with a completion file as part of the > port but doesn't install a file to the .d system dirs. That sounds like an omission which I encourage you to report to the maintainer of the NPM port. Created attachment 240584 [details]
Updated to include completion for bash fish zsh completion files
Added comp files for bash zsh and fish
I don't see anything for elvish at least for the ports' installation.
I don't believe powershell is a thing on FreeBSD.
Thanks. Will add this one to my next batch. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=c84bcb76f0f76d2f56cf25953c42eeac8dbe4419 commit c84bcb76f0f76d2f56cf25953c42eeac8dbe4419 Author: Derek Schrock <dereks@lifeofadishwasher.com> AuthorDate: 2023-03-04 20:38:06 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-03-06 22:23:44 +0000 textproc/code-minimap: New port textproc/code-minimap A high performance code minimap render. This tool [1] is for generating text minimaps at speed. You can use it to implement IDE-like minimap plugin for a terminal text editor, minimap.vim [2] for example. [1] https://github.com/wfxr/code-minimap [2] https://github.com/wfxr/minimap.vim Submitter becomes maintainer. Already maintainer of other ports. PR: 269951 textproc/Makefile | 1 + textproc/code-minimap/Makefile (new) | 81 ++++++++++++++++++++++++++++++++++ textproc/code-minimap/distinfo (new) | 83 +++++++++++++++++++++++++++++++++++ textproc/code-minimap/pkg-descr (new) | 3 ++ 4 files changed, 168 insertions(+) Thank you for your contribution. |