%F token in Nemo actions does not expand to file path (expands to empty string)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 368
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 2
Description
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)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with ~/.local/share/nemo/actions/test-tokens.nemo_action and compare the action Exec expansion for %f, %F, %U, %d, and %D. Start by tracing Nemo's action-token handling, using /usr/share/nemo/actions/sample.nemo_action and NEMO_SCRIPT_SELECTED_FILE_PATHS as references; done means path and URI tokens expand to the documented values while %f remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100