Repository navigation
Conversation
xdg-open splits a .desktop Exec line on spaces, so the sh -c wrapper used to reach ~/.local/bin broke with 'Unterminated quoted string' and nothing opened, while gio and file managers worked. The entries are now templates with @bin@, rendered by the installer with the absolute path, and the Word/Excel/PowerPoint choice between empty app and file moved into m365-open --app. m365-open also calls m365 next to itself instead of relying on PATH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening a .pptx/.docx/.xlsx with
xdg-open(terminal, many apps) did nothing when "Open with Microsoft 365" is the default. xdg-open's generic launcher splits the Exec line on spaces, so thesh -c "exec ~/.local/bin/m365-open \\"\\$@\\"" sh %Fwrapper fails withUnterminated quoted string, and xdg-open still exits 0. Double-clicking in a file manager (gio) worked, which hid the bug.Fix
config/applications/*.desktop: Exec is now a single command with an@BIN@placeholder, nosh -c.linux/install.sh(apps): renders the entries with the absolute~/.local/binpath into~/.local/share/rhmatzeka-tools/applications/and links them as before, so uninstall still works through the manifest.bin/m365-open: new--app word|excel|powerpoint [FILE...](no file opens the empty app, which the Word/Excel/PowerPoint entries used to decide in shell), and it callsm365next to itself instead of relying on PATH.Tested
xdg-openandgio launchwith a file name containing spaces: the path reaches m365-open as one argument (logging stub, nothing uploaded).m365-open --app powerpointwith PATH=/usr/bin:/bin: m365 starts the empty app.sh -n,bash -n, shellcheck: clean.After merging
Existing installs link straight to the templates, so re-run the apps component once (
./install.sh --only apps) to render the new entries.