albertlauncher / albert

A fast and flexible keyboard launcher
https://albertlauncher.github.io
Other
7.28k stars 306 forks source link

[plugin-id] Applications plugin is trying to parse `Exec` in a custom `.desktop` file and failling #1425

Closed stevenxxiu closed 3 months ago

stevenxxiu commented 3 months ago

Package source

v0.26.0 built from source

App logs

02:47:24 [info:albert] Detached process started successfully. (WD: /home/steven, PID: 23269, CMD: QList("sh", "-c", "'cd", "~/foo/;", "~/.local/bin/nvim", "$@'", "sh")
~/foo/;: -c: line 1: unexpected EOF while looking for matching `''

Current Behavior

Albert appears to be trying to parse Exec, and doing so incorrectly. This didn't happen to the previous version I used, v0.25.0.

Expected Behavior

Albert should just run whatever is given in Exec verbatim.

Anything else?

My custom nvim.desktop looks like:

[Desktop Entry]
Type=Application
Name=Neovim
Icon=nvim
Exec=sh -c 'cd ~/foo/; ~/.local/bin/nvim "$@"' sh %F
ManuelSchneid3r commented 3 months ago

Dupe https://github.com/albertlauncher/albert/issues/1422