1

I run two separate instances of vifm on my machine:

$ vifm --server-list
documents
photos

In one I'm organising documents and in the other photos. Sometimes I'm inside a third shell and would like to give commands to one of the vifm instances. Had I only one instance I would do:

$ vifm --remote -c 'normal p'

But that does not allow me to select the instance I'm giving that command to. The first instance (in asciibetical order, from what I tested) is always picked to run the command. In other words, I cannot send commands to the photos instance.

How can I send a command to the photos instance?

grochmal
  • 8,489
  • 4
  • 30
  • 60

1 Answers1

2

You need to specify additional argument you already know about (as you named your instances by using it):

$ vifm --help | grep -A1 server-name
  vifm --server-name <name>
    name of target or this instance.

Note this part:

name of target ... instance.

In your case end command will look like the following:

$ vifm --server-name photos --remote -c 'normal p'

P.S. Option name is a bit confusing, but matches corresponding option of Vim.

xaizek
  • 324
  • 1
  • 3
  • 11