0

I have some commands that I use in many file managers in the same form.

Taking one as an example:

terminator -e  "filebot -get-subtitles -rename -non-strict %f"

In the same form it works in a Thunar custom action, and also after the Exec= line in a Nautilus action file in ~/.local/share/file-manager/actions (that also appears in PCManFM), in a contract file in Pantheon-Files (~/.local/share/contractor/) and in a service-action file in Dolphin (~/.local/share/kservices5/).

Creating a nemo_action file in ~/.local/share/nemo/actions/ of the form

[Nemo Action]

Name=Download ENGLISH subtitles
Exec=terminator -e  "filebot -get-subtitles -rename -non-strict %f"
Selection=s
Extensions=avi;flv;mp4;mov;dir;

I get this error:

 /bin/bash: -c: line 0: syntax error near unexpected token `('

This is posted in order to provide an answer.

0

Two more lines are needed for this to work:

Quote=double
EscapeSpaces=true

But also a change is needed in the command: instead of %f it must be '%F'.

So:

[Nemo Action]
Name=Download ENGLISH subtitles
Exec=terminator -e  "filebot -get-subtitles -rename -non-strict '%F'" 
Selection=s
Extensions=avi;flv;mp4;mov;dir;
Quote=double
EscapeSpaces=true

On problem with spaces some discussions here and here.

On the %F token - here - under # Standard tokens that can be used:

# %F - insert path list of selection
...
# %f or %N (deprecated) - insert display name of first selected file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy