Opened 12 years ago

Closed 12 years ago

#33064 closed enhancement (invalid)

port new actions: active, inactive

Reported by: anddam (Andrea D'Amore) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.0.3
Keywords: haspatch Cc: mkae (Marko Käning)
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 (2)

base-action_active_inactive.diff (2.2 KB) - added by anddam (Andrea D'Amore) 12 years ago.
patch-port-bash_completion.diff (2.8 KB) - added by anddam (Andrea D'Amore) 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by anddam (Andrea D'Amore)

Changed 12 years ago by anddam (Andrea D'Amore)

comment:1 Changed 12 years ago by anddam (Andrea D'Amore)

Port: bash-completion added

comment:2 Changed 12 years ago by jmroot (Joshua Root)

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 12 years ago by anddam (Andrea D'Amore)

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 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase
Keywords: base removed

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 12 years ago by anddam (Andrea D'Amore)

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.

comment:6 Changed 12 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

comment:7 Changed 12 years ago by anddam (Andrea D'Amore)

Resolution: invalid
Status: newclosed

Closed as invalid.

Note: See TracTickets for help on using tickets.