fabiospampinato / vscode-open-in-application

Open an arbitrary file in its default app, or the app you want.
MIT License
19 stars 0 forks source link

Doesn't open the appimage software #5

Closed lamyergeier closed 5 years ago

lamyergeier commented 5 years ago

Goal: To open markdown file in marktext-0.13.65-x86_64.AppImage

Operating System: Ubuntu 18.4 VS Code details: Version: 1.28.2 Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850 Date: 2018-10-17T00:20:56.183Z Electron: 2.0.9 Chrome: 61.0.3163.100 Node.js: 8.9.3 V8: 6.1.534.41 Architecture: x64

# /home/nikhil/.bash_aliases
alias marktext="/home/nikhil/bin/marktext-0.13.65-x86_64.AppImage"

This alias works, I have tested it in bash.

// /home/nikhil/.config/Code/User/settings.json
    "openInApplication.applications": {
          "html":   "/usr/bin/google-chrome",
          "md":     "marktext",
          "pdf":    "/usr/bin/evince",
          "png":    "/usr/bin/pinta",
          "svg":    "/usr/bin/google-chrome",
        }

Issue: Doesn't open the appimage marktext


Providing full-path instead of alias also doesn't work:

// /home/nikhil/.config/Code/User/settings.json
    "openInApplication.applications": {
          "html":   "/usr/bin/google-chrome",
          "md":     "/home/nikhil/bin/marktext-0.13.65-x86_64.AppImage",
          "pdf":    "/usr/bin/evince",
          "png":    "/usr/bin/pinta",
          "svg":    "/usr/bin/google-chrome",
        }
fabiospampinato commented 5 years ago

@anishmittal2020 the extension doesn't know about your aliases. Does /home/nikhil/bin/marktext-0.13.65-x86_64.AppImage have executable permissions? Maybe open doesn't support this use case and we should switch to opn perhaps, if anyone has a solution to this I'd be happy to accept a PR.

lamyergeier commented 5 years ago

/home/nikhil/bin/marktext-0.13.65-x86_64.AppImage has executable permissions.

lamyergeier commented 5 years ago

@fabiospampinato the extension doesn't know about your aliases.

So, I did as follows

"openInApplication.applications": { "md": "marktext-0.13.65-x86_64.AppImage", }

# On Bash
type marktext-0.13.65-x86_64.AppImage
marktext-0.13.65-x86_64.AppImage is hashed (/home/nikhil/bin/marktext-0.13.65-x86_64.AppImage)

Even still it doesn't work!

probonopd commented 5 years ago

Does it work when you run on the command line: /home/nikhil/bin/marktext-0.13.65-x86_64.AppImage /the/file/you/want/to/open?