pwmt / zathura

Document viewer
https://pwmt.org/projects/zathura
zlib License
2.05k stars 144 forks source link

"$PAGE" string in file name get replaced with the page number in `:exec` command #372

Closed sebastinas closed 5 months ago

sebastinas commented 1 year ago

On GitLab by @user202729 on Jan 21, 2023, 04:50


As mentioned in the title, if some file has name for example 1$PAGE3.pdf then exec some-command $FILE will pass 123.pdf to some-command.

Side note, I think the issue is with https://git.pwmt.org/pwmt/zathura/-/blob/develop/zathura/commands.c#L559 which replaces $FILE before replacing $PAGE. Reversing the replacement order would fix the issue.

sebastinas commented 10 months ago

mentioned in commit ca80f7344948eec1a2842b1af43505a33d9bea15