Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.

Is it possible to get a shell prompt in vifm, like mc has?

+1 vote
asked Jul 28, 2015 in vifm by Anonymous

Consider a command "foo" and a file name "bar".

In midnight commander one can:

  1. type the command followed by a space
  2. hit Ctrl-Enter to get the name of the currently selected file added to the command line
  3. it is possible to repeat 2. multiple times for many files
  4. after this the command line looks like "$ foo bar"
  5. hit enter to execute it
  6. hit Ctrl-O to hide mc panes and see the output
  7. hit Ctrl-O again to show panes back

How to do the same (or a similar) workflow in vifm?

1 Answer

0 votes
answered Jul 28, 2015 by xaizek
edited Nov 23, 2015 by xaizek
 
Best answer

As far as I know mc doesn't provide real prompt, just similar one. And seventh step might need a correction, any key seems to restore normal mc UI.

A way of doing this in vifm is:

  1. Typing :!!anything (note double exclamation mark to force waiting after running the command, with :!anything shell is paused only if command fails).
  2. Using one of Ctrl-X shortcuts (Ctrl-X c adds current file name, see other keys in documentation).
  3. Repeat previous step inserting parts of file names in different places of the command.
  4. Hit Enter.
  5. View command output and hit Enter to dismiss it.

As for the Ctrl-O-like shortcut, it's easy to add, although this particular key is already taken by history movement. There is an old TODO item related to this:

Maybe we should add a command to view screen ?

So it was considered, but there were no actual requests for it to be added and adding something unused isn't the best strategy. Let me know if you need such a shortcut.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...