Skip to content
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

open command does not respect mimetype.toml #490

Open
BigBrotherJu opened this issue Feb 11, 2024 · 4 comments
Open

open command does not respect mimetype.toml #490

BigBrotherJu opened this issue Feb 11, 2024 · 4 comments

Comments

@BigBrotherJu
Copy link

BigBrotherJu commented Feb 11, 2024

When I press l or enter in joshuto, the text file (with extention and without extention) under cursor is not opened according to mimetype.toml. Instead, the bottom line displays :open_with.

My config folder ~/.config/joshuto does not contain mimetype.toml, so joshuto should be using the default one.

I'm on Mac Sonoma with joshuto 0.9.6.

@kamiyaa
Copy link
Owner

kamiyaa commented Mar 11, 2024

The default config may not contain an editor that your system has, which is why its prompting :open_with

For mac, I would recommend enabling

xdg_open = true
xdg_open_fork = true

inside joshuto.toml

@BigBrotherJu
Copy link
Author

BigBrotherJu commented Mar 11, 2024

The default config may not contain an editor that your system has, which is why its prompting :open_with

But I already installed micro and bat. According to the default mimetype.toml, one of them should be used when opening text file. @kamiyaa

@BigBrotherJu
Copy link
Author

BigBrotherJu commented Mar 31, 2024

Figured it out. The default mimetype.toml has to be present in my ~/.config/joshuto folder for l or enter to work.

This seems to contradict the statement in config doc:

Joshuto's behavior is:

  • If there exists a config file, use that config. (No default or inherited values from a default config)
  • If there is no config file, a default config will be used (found under config/)

In my case, if there is no mimetype.toml in ~/.config/joshuto, the default mimetype.toml is not used.

@bulletmark
Copy link

I installed joshuto on Arch looking to try a faster ranger but every file I open just prompts :open_with as the OP here describes.

I notice that the joshuto package (or the joshuto-bin package) on Arch just installs a single file /usr/bin/joshuto does that seem right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants