#37961 closed enhancement (fixed)
zsh: port completion is no longer available (+mp_completion)
Reported by: | jrblevin@… | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | nonstop.server@…, cooljeanius (Eric Gallager), g5pw (Aljaž Srebrnič) | |
Port: | zsh |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I upgraded my ports today and noticed that my tab completion was
broken for the port
command in zsh. While investigating this, I
noticed that the zsh-devel port was marked obsolete in favor of the
zsh port. I'm glad to see that the zsh port was brought up to date,
but is it possible to restore the +mp_completion variant?
The patch should be straightforward. The mp_completion code from zsh-devel simply copied the _port file to the appropriate directory:
variant mp_completion description {Install port(1) completion file} { post-destroot { set sitedir ${prefix}/share/${my_name}/site-functions xinstall -m 0644 ${filespath}/_port \ ${destroot}${sitedir} } }
The _port file is, of course, still available in the repository:
browser:trunk/dports/shells/zsh-devel/files/_port?rev=100755
I verified that placing this file in
/opt/local/share/zsh/site-functions
restored my ability to use tab
completion with the port
command using the current zsh
package.
Change History (11)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to larryv@… |
comment:2 follow-up: 3 Changed 12 years ago by larryv (Lawrence Velázquez)
Version: | 2.1.3 |
---|
Replying to jrblevin@…:
I'm glad to see that the zsh port was brought up to date, but is it possible to restore the +mp_completion variant?
I will not be restoring mp_completion
, but I’m planning on putting the function file into contrib
and creating a subport for it. Eventually, I might even get the zsh devs to include it with zsh itself. In the meantime, a more robust solution for you would be to put _port
into a directory you control (i.e., not one under the MacPorts prefix) and add that directory to your fpath
.
I’ll leave this ticket open until I add the new subport.
comment:3 Changed 12 years ago by jrblevin@…
Replying to larryv@…:
I will not be restoring
mp_completion
, but I’m planning on putting the function file intocontrib
and creating a subport for it.
Thanks very much for your quick reply. I'll keep an eye out for the subport, and I'll place the file elsewhere in the meantime.
comment:5 follow-up: 6 Changed 12 years ago by jmroot (Joshua Root)
Why a subport? It doesn't seem like the code for installing mp_completion would have anything in common with the code for building zsh.
comment:6 Changed 12 years ago by larryv (Lawrence Velázquez)
I was thinking that it would be more convenient, but you’re probably right; it should be a separate port.
comment:8 Changed 11 years ago by g5pw (Aljaž Srebrnič)
What about crafting a port for zsh-completions on github? It has a completion file for MacPorts.
comment:10 follow-up: 11 Changed 11 years ago by g5pw (Aljaž Srebrnič)
Resolution: | → fixed |
---|---|
Status: | new → closed |
The port completion file was added as part of the zsh-completions
package in r114630. If you need port completions, please install that package.
The mp_completion variant was removed in r101584. The reason given in the commit message is that it "installs a file that has zero versioning relationship to anything else that is installed".