Opened 10 years ago

Closed 10 years ago

#40687 closed enhancement (fixed)

bash-completion: port load and port unload should only complete installed port names

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: bash-completion

Description

When I type port load my and press tab twice, I see the names of all ports whose names begin with "my" regardless of whether I've installed them. It should only show me the ports I've installed, because you can't load or unload a port that isn't installed.

Ideally it would only show those ports that actually have launchd plists but I don't expect bash-completion to be able to know that.

Change History (1)

comment:1 Changed 10 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

There is no easy way to check if the port installs a LaunchDaemon without parsing the Portfile or checking port contents. But for that I would already need a port name and running such checks on an incomplete prefix match would take way too long. I don't have a solution for this at the moment.

As of r112058, port load/port unload will only complete active ports.

Note: See TracTickets for help on using tickets.