-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nemo actions stopped working after Nemo update #2274
Comments
line. As of d41298b, the find_token_type() function was only finding tokens in the order listed in the function. For example, if an action exec line was 'foo %P %F', since the parent token (P) came after the file path token (F) in find_token_type(), it was completely ignored. This changes the function to search for occurrences of '%', then performing a prefix check starting at the result pointer. Should fix issue one in #2107.
Your expected behavior - is that what you expect based on the action you have there? Currently I get:
with a fix I was messing with (26f4736), I then get:
If you wish I can do a build for it to test. |
@mtwebster Sorry for long delay answer ! And thank you for your time I made a mistake in my original report and I just re-edited it to make it more clear (I hope).
Yes, this fix seems to do the trick 🥳 It would be great is you could add this fix to master ! Thanks again (@icarter09 can you consider reopening this issue, as this is still a problem in nemo 4.4.2 ?) |
ps: can't you use regex for parsing those complicated syntax ? I may be wrong but I've the feeling that you're defining a state machine to parse the |
When I wrote this, I was a lot more ignorant than I am now - a lot of work in nemo-action.c could be simplified (the command-line construction especially) - as far as actually reading the entries in the action file, I think using the GKeyFile api is still probably the best way to go, if only because it's familiar and simple to use. I've never had a chance to revisit this simply because of the lack of time, and worry about regressions. I'll try to refamiliarize myself with that patch and see if I can get it in for the next release. |
I forgot about this commit: 5802d29 That might be sufficient for this case. |
Issue
Hi, I'm maintaining a Nemo actions pack. This repo contains a lot of Nemo actions I'm using everyday for my work.
For some reason (to use a script that executes the same command for a lot of files, showing a progress bar using
zenity
) I need to pass arguments to a custom script. This script call bash, making use of parameter expansion to remove file original extension and add.flac
extension.The complete call is:
This still worked well in v
4.0.6
but stopped working after.Steps to reproduce
Some tests made me find that the source of the problem is the
%
symbol in theExec
line, and the problem can be resumed to this POC:This action call
print.sh
script with a first argument:%
, and then the list of selected files.scripts/print.sh
that only prints arguments it received:Expected behaviour
Actual behaviour
Other information
this worked well in v
4.0.6
if I remove the
%
in theExec
line:Exec=<scripts/print.sh "" %F>
this works as expectedI'm not sure, but I think that this problem have been included in that commit: 2edf5ff (related to Some issues with nemo actions #2107)
The text was updated successfully, but these errors were encountered: