Skip to content

%F token in Nemo actions does not expand to file path (expands to empty string) #3774

Description

@iampossiblyatwork

Distribution

Linux Mint version: 22.3 "Zena"

Package version

Nemo version: 6.6.3

Frequency

Always

Bug description

The %F token is documented in /usr/share/nemo/actions/sample.nemo_action as:

# %F - insert path list of selection

However, when used in a custom action's Exec line, %F expands to an empty string. Only %f
produces a value, but it gives just the display name (filename without path), which matches
its own documentation (# %f or %N (deprecated) - insert display name of first selected file).

All other path/URI tokens (%U, %D, %d, %p, %P) also expand to empty strings.

Steps to reproduce

  1. Create ~/.local/share/nemo/actions/test-tokens.nemo_action:

    [Nemo Action]
    Active=true
    Name=Test Tokens
    Exec=bash -c 'echo "f=[%f] F=[%F] U=[%U] d=[%d] D=[%D]" >> /tmp/nemo-token-test.log'
    Selection=S
    Extensions=Any;

  2. Right-click any file -> Test Tokens

  3. Read /tmp/nemo-token-test.log

Actual result:
f=[filename.ext] F=[] U=[] d=[] D=[]

Expected behavior

Expected result:
f=[filename.ext] F=[/full/path/to/filename.ext] U=[file:///full/path/to/filename.ext] ...

Additional information

The NEMO_SCRIPT_SELECTED_FILE_PATHS environment variable is set correctly and can be read
from the script:

path=$(printf '%s' "$NEMO_SCRIPT_SELECTED_FILE_PATHS" | head -1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions