Ticket #3713 (new enhancement)

Opened 7 years ago

Last modified 4 years ago

Extend info panel with output of external program

Reported by: sachahony Owned by:
Priority: minor Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc: egmont
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Dear MC developers,

I use MC a lot during my work. I thought of a possible usability addition that would improve my work flow significantly.

I often browse through older archives and directories in which case I use the quickview-panel to inspect the content. During this I find myself repeatedly entering and leaving the archives/directories to browse to the README file to inspect it.

It would be a great addition if I could add a "custom command view panel" which calls upon an external program to generate output to display in the viewer panel. I could than write a simple bash script that outputs the content of the README

I have inspected the mc source code and it seems like a relative simple addition because the whole framework of calling external programs based on file-magic is already there.

Many thanks for your kind consideration and the great program that you produce,

Sacha

Change History

comment:1 Changed 7 years ago by mooffie

I've been planning to suggest the same feature for info (c-x i), not quick-view (c-x q). There are two or three tickets asking to extend the information in the info panel, and displaying the output of an external program there seems to be the right solution.

If that idea suits you as well, then we'll need the administrator to change the title here and then I'll add a little summary of my own linking to the other tickets (which we could then mark as duplicates).

Otherwise I don't get you: what has the "framework of calling external programs based on file-magic" got to do with this?

I have inspected the mc source code and it seems like a relative simple addition

(Let's not label tasks as "simple" or otherwise. The programmer who will take up the glove may end up needing to rewrite the whole system, and we certainly don't want to belittle his/her effort.)

comment:2 follow-up: ↓ 3 Changed 7 years ago by sachahony

I agree that the info is the proper place. Merging the tickets seems to be a good idea.

comment:3 in reply to: ↑ 2 Changed 7 years ago by mooffie

Replying to sachahony:

I agree that the info is the proper place. Merging the tickets seems to be a good idea.


@Andrew or @Yury: could you please change the title to: "Extend info panel with output of external program" ?

This feature can solve:

#2385
#2904

(Perhaps you should mark them as "dup" of this one.)

I'm sure there are one or two more tickets; I'll add them here as I stumble upon them.

Ideas for other stuff the user can do with this feature:

  • Show the distro's package the file we're standing on belongs to (e.g., by running "dlocate $1" (which is quicker than "dpkg -S $1")).
Last edited 7 years ago by mooffie (previous) (diff)

comment:4 Changed 7 years ago by zaytsev

  • Summary changed from Possible usability addition to mc quickview panel to Extend info panel with output of external program

comment:5 Changed 7 years ago by zaytsev

@mooffie, now you should be able to do it yourself ;-) I'm not greedy...

comment:6 Changed 7 years ago by zaytsev

Ticket #2385 has been marked as a duplicate of this ticket.

comment:7 Changed 7 years ago by zaytsev

Ticket #2904 has been marked as a duplicate of this ticket.

comment:8 Changed 7 years ago by egmont

  • Cc egmont added

comment:9 in reply to: ↑ description Changed 7 years ago by boruch

Replying to sachahony:

How is your request not handled currently by the mc feature "F2" user menu, which allows users to script their own commands, call external programs / scripts, display whatever they want, and even interact with the user?

What I see of merit in your request is to make available to the user the mc internal collection of what they call "widgets", so that user can script extensions that appear as seamless parts of mc instead of being launched in the subshell and appearing as independent whiptail or command-line output.

mc did at one point kind of take a step in that direction. There exists a macro %{some_text}in the specification for the user menu that allows the user to create an mc input_box "widget" that looks seamlessly integrated with mc. For me, the major limitation of that implementation is that it's executed during macro expansion, so it's unavailable for run-time input queries.

comment:10 Changed 4 years ago by andrew_b

  • Component changed from mcview to mc-core
Note: See TracTickets for help on using tickets.