Ticket #33064 (closed enhancement: invalid)
port new actions: active, inactive
| Reported by: | and.damore@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | base | Version: | 2.0.3 |
| Keywords: | haspatch | Cc: | mk@… |
| Port: | bash-completion |
Description
I find it useful to list only inactive ports so I added two actions for active and inactive, they are NOARGS and actually resolve to a call to action_echo.
I'm adding the bash completion diff patch as well.
Attachments
Change History
comment:2 Changed 16 months ago by jmr@…
People get confused enough about the difference between pseudo-ports and actions already. I don't think there is sufficient value in adding more actions just so you can avoid typing "echo".
comment:3 Changed 16 months ago by and.damore@…
Avoiding adding new actions isn't the right way to address the problem with people getting confused.
We should rather clarify instruction by writing a better section in man page or a more evident "Macports Primer" in homepage.
I seem to recall other methods that could just left to echo, outdated is first one coming to mind.
comment:4 follow-up: ↓ 5 Changed 16 months ago by ryandesign@…
- Keywords base removed
- Component changed from ports to base
But that's just it: the outdated action is not the same as the echo action. "port outdated" (which is a shortcut for "port outdated outdated") does not produce the same output as "port echo outdated".
You're suggesting we provide a shortcut for "port echo active", but it's just as likely that I'd want to see the output of "port installed active" instead. I don't think it makes sense to add a shortcut for one and not the other.
Remember also that we can now use the shortest unambiguous name for a command, so I can type "port ac" to activate a port:
$ sudo port ac vobcopy @1.2.0_0+universal ---> Computing dependencies for vobcopy ---> Deactivating vobcopy @1.2.0_1+universal ---> Activating vobcopy @1.2.0_0+universal ---> Cleaning vobcopy
With your patch, this case would no longer work; I would instead get:
$ sudo port ac vobcopy @1.2.0_0+universal
Ambiguous action "ac": could be any of {activate active}.
So for all these reasons I agree with jmr that we should not implement this suggestion.
If we were to implement the suggestion, remember that we have a third pseudo-port: actinact, which shows ports which have both an active and at least one inactive version installed.
comment:5 in reply to: ↑ 4 Changed 16 months ago by and.damore@…
Replying to ryandesign@…:
But that's just it: the outdated action is not the same as the echo action. "port outdated" (which is a shortcut for "port outdated outdated") does not produce the same output as "port echo outdated".
Would you like it more if I copy behavior from "installed" action for an "inactive" action instead?
That is the action would accept a list of port.

