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

feat: add more supported archive formats to the preset config #1926

Merged
merged 15 commits into from
Dec 20, 2024

Conversation

Integral-Tech
Copy link
Contributor

@Integral-Tech Integral-Tech commented Nov 20, 2024

@Integral-Tech Integral-Tech changed the title feat: detect zstd & apk as archives feat: preview & extract file formats supported by 7-zip Nov 21, 2024
@Integral-Tech
Copy link
Contributor Author

@sxyazi This PR has been completed :) Would you like to review it?

@sxyazi sxyazi force-pushed the main branch 2 times, most recently from ea6e50c to 428c922 Compare November 21, 2024 16:42
@sxyazi
Copy link
Owner

sxyazi commented Nov 22, 2024

Thanks for the PR!

I noticed you referenced the supported formats of 7zip, but 7zip has several different versions. On Arch Linux, Yazi uses p7zip, which is a fork of 7zip, while on macOS, it uses 7zip (sevenzip), I'm not sure about Windows.

The supported formats often vary between them. For default configuration, we need to consider the formats supported across all platforms, which means focusing on the smallest common subset - supported by both 7zip and p7zip on Linux, macOS and Windows.

This PR includes many formats I've never seen before, which makes testing them much more difficult. I think we can limit it to common formats that have been verified to work. This would also simplify the rules, especially considering that 7zip is just a temporary solution during the transition. Eventually, I'll implement it myself (see #1864 (comment)), but it's unlikely to support all the formats 7zip does, which would also help reduce confusion once we switch to another tool.

@Integral-Tech
Copy link
Contributor Author

Integral-Tech commented Nov 22, 2024

@sxyazi I just removed application/zlib which is not supported by p7zip.

Additionally, .dmg & .DMG are added as not all .dmg files have MIME type application/apple-diskimage. Take Icalingua++ as an example, it has application/zlib MIME type.

@sxyazi sxyazi force-pushed the main branch 7 times, most recently from 2b70f8d to 5e48df5 Compare November 26, 2024 09:11
@sxyazi sxyazi force-pushed the main branch 2 times, most recently from 43473db to d72f903 Compare November 30, 2024 13:26
@sxyazi sxyazi force-pushed the main branch 2 times, most recently from 1394fb4 to 62ac224 Compare December 9, 2024 02:28
@sxyazi sxyazi changed the title feat: preview & extract file formats supported by 7-zip feat: add more supported archive formats to the preset config Dec 20, 2024
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you so much!

@sxyazi sxyazi merged commit 87bfd8e into sxyazi:main Dec 20, 2024
6 checks passed
@Integral-Tech Integral-Tech deleted the detect-zstd-apk branch December 20, 2024 09:57
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 21, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sxyazi/yazi](https://github.com/sxyazi/yazi) | patch | `v0.4.1` -> `v0.4.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sxyazi/yazi (sxyazi/yazi)</summary>

### [`v0.4.2`](https://github.com/sxyazi/yazi/releases/tag/v0.4.2)

[Compare Source](sxyazi/yazi@v0.4.1...v0.4.2)

This is a quick patch release with 3 fixes:

-   Fixed an issue where switching directories in Yazi didn't update the CWD, causing issues with features that depend on the CWD (like terminal splitting and `cd --interactive` path completion).
-   Fixed a bug where the UI wouldn't refresh when returning to Yazi from an external blocking process (like a shell) while in an empty directory.
-   Fixed an issue where the preview wouldn't update after sorting directories when using the [Folder-specific rules](https://yazi-rs.github.io/docs/tips/#folder-rules) tip.

Here are some new features:

-   Added support for a large number of new archive formats for extraction, previewing, and filetype highlighting in sxyazi/yazi#1926 (thanks to [@&#8203;Integral-Tech](https://github.com/Integral-Tech)).
-   Added a new temporary option `_v4_suppress_deprecation_warnings` in [#&#8203;2027](sxyazi/yazi#2027) to suppress all deprecation warnings as a workaround for the transition to version 0.4:
    ```toml
    ```

### yazi.toml

\[manager]
\_v4\_suppress_deprecation_warnings = true

    - Added 2 new Lua APIs
    - `fs.cwd()` - get the current working directory
    -  `fs.create()` - create a directory (Thanks to @&#8203;hankertrix)
    #### What's Changed
    * fix: interactive `cd` autocomplete doesn't follow the latest `CWD` changes by @&#8203;sxyazi in sxyazi/yazi#2025
    * feat: new option to suppress 0.4 deprecation warnings by @&#8203;sxyazi in sxyazi/yazi#2027
    * fix: offset cursor shift when deleting multiple files in bulk by @&#8203;sxyazi in sxyazi/yazi#2030
    * chore: bump version to 0.4.2 by @&#8203;sxyazi in sxyazi/yazi#2031
    * fix: choose a more conservative `macro_workers` value to ensure concurrency safety with certain USB flash drives by @&#8203;sxyazi in sxyazi/yazi#2040
    * feat: support for Android platform in the `for` qualifier of opener by @&#8203;sxyazi in sxyazi/yazi#2041
    * fix: set the current working directory in a thread-safe way by @&#8203;sxyazi in sxyazi/yazi#2043
    * fix: `allow-passthrough` must be set to `on` to prevent `tmux` from forwarding the real terminal's response to the inactive pane by @&#8203;sxyazi in sxyazi/yazi#2052
    * fix: pass through `show_hidden` when building default `Files` by @&#8203;sxyazi in sxyazi/yazi#2057
    * fix: use a less intrusive `DSR` instead of `DA1` workaround to forward terminal responses twice in `tmux` by @&#8203;sxyazi in sxyazi/yazi#2058
    * feat: new `--cwd` parameter for the `shell` command and `fs.cwd()` API by @&#8203;sxyazi in sxyazi/yazi#2060
    * feat: allow `noop` for single-key chords by removing the mixing length limit by @&#8203;sxyazi in sxyazi/yazi#2064
    * ci: add riscv64gc-unknown-linux-gnu target by @&#8203;Integral-Tech in sxyazi/yazi#2067
    * fix: missing a render after resuming from an external blocking process by @&#8203;sxyazi in sxyazi/yazi#2071
    * feat: add more supported archive formats to the preset config by @&#8203;Integral-Tech in sxyazi/yazi#1926
    * feat: new `fs.create()` Lua API by @&#8203;hankertrix in sxyazi/yazi#2068
    * fix: missing a hover after reordering from an external plugin by @&#8203;sxyazi in sxyazi/yazi#2072

    **Full Changelog**: sxyazi/yazi@v0.4.1...v0.4.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Ny4wIiwidXBkYXRlZEluVmVyIjoiMzkuNzcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants