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
-
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;
-
Right-click any file -> Test Tokens
-
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)
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:
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
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;
Right-click any file -> Test Tokens
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: